android-actionbar

ActionBar with NoTitleBar Theme.Holo.Light

筅森魡賤 提交于 2019-12-25 03:06:27
问题 I have an Android tabbed app. I don't want anything else other than the tabs to be displayed at the top of the screen. This works alright, the only problem is that, when launching the app, for a short moment < 1sec, I can see the title bar with the application launcher icon. Why is this happening, is there a way to prevent this? styles.xml <resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --

Exiting fullscreen activity sometimes leaves artifacts in action bar and system navigation areas

 ̄綄美尐妖づ 提交于 2019-12-25 02:56:03
问题 I have a normal Activity (A) with visible Action Bar which launches another fullscreen activity (B) to display photos. When (B) finishes and activity (A) is displayed back sometimes I can see the following picture: Please note visual distortion of action bar and navigation areas. The above artifacts disappear only when I start interacting with the activity, scrolling it, etc. Full screen activity code: protected void onCreate(Bundle savedInstanceState) { supportRequestWindowFeature(Window

onNavigationItemSelected never called on Actionbar's spinner

好久不见. 提交于 2019-12-25 02:46:23
问题 I'm trying to build a drop down menu in the Action Bar Compat, as per the dev example: http://developer.android.com/guide/topics/ui/actionbar.html#Dropdown I can't get onNavigationItemSelected to fire though. The spinner dropdown item in the action bar is being generated, to the right of the actionbar's Title. When I press it I do see the triangle icon turn blue. The OnNavigationListener and Sting[]strings are being ran in OnCreate. How would I get this to work? public class Main extends

Programmatically set ActionBarTab background color with tab selector line color at bottom with user chosen color in ActionBarTab?

痴心易碎 提交于 2019-12-25 02:34:36
问题 I want to change my ActionBar's Tabs background color with tabs selector line at bottom color. I want to do that by using java code not xml. I have tried creating ActionBar tabs .. actionBar = getActionBar(); // Hide the action bar title ActionBar actionBar.setDisplayShowTitleEnabled(false); // Enabling Spinner dropdown navigation actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); ActionBar.Tab PlayerTab = actionBar.newTab().setText("Fragment A"); ActionBar.Tab StationsTab =

Android - Remove Title Bar (ActionBar)

孤街浪徒 提交于 2019-12-25 02:09:14
问题 Can anyone tell me how to do the following, Remove The App Title bar & keep the action bar. Move Tab Bar(Action Bar) to the bottom of the screen. Remove Swipe Feature from the Tab. 回答1: Do this Myactionbar().setDisplayShowTitleEnabled(false); Myactionbar().setDisplayShowHomeEnabled(false); Where my action bar is the name of your action bar 回答2: you can add android:theme="@android:style/Theme.NoTitleBar" in your manifest file for your activity 回答3: We have to clarify some contents of your

How to change background color of overflow menu (popup Menu) for action bar

穿精又带淫゛_ 提交于 2019-12-25 01:48:24
问题 I am using android compact library for building the action bar for both older and newer versions of android. so my requirement includes that i need to show action bar in blue color. now i have changed the action bar background color to blue , now i want to change the background color of popup menu which comes when we click on overflow icon. I tried in many ways but nothing is changing the background color.any one suggest me whether we can change the background color of popup menu using app

Action bar not shown in Android Studio

馋奶兔 提交于 2019-12-25 01:22:47
问题 I'm using Android Studio for the first time and can't manage to make the ActionBar show when I run the app. Here's what I have so far: My Activity MainActivity.java package xeniasis.mymarket; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.support.v7.app.ActionBar; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);

Android: Change actionbar icon after click and change it back after onCreate()

跟風遠走 提交于 2019-12-25 00:19:28
问题 I try to change the icon of the action bar to a progress bar in onOptionsItemSelected(MenuItem) method. public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; case R.id.progressitem2: mProgress = item; mProgressCreate = mProgress; mProgress.setActionView(R.layout.progress); mLayout.removeView(mTable); // Execute code that change mTable again. return true; } progress.xml file: <LinearLayout

Actionbar Back/Home Arrow Padding and Pressed State

五迷三道 提交于 2019-12-24 22:27:40
问题 I wanted to have up/home arrow button in my activity ActionBar to provide users option for navigating up. In my activity, I have set set getActionBar().setDisplayHomeAsUpEnabled(true); and also have defined parentActiviy in Manifest like this: <activity android:name="com.g_node.gca.map.MapActivity" android:parentActivityName="com.g_node.gca.MainActivity" android:label="@string/title_activity_map" > </activity> It works and I see a left-arrow icon before the icon in ActionBar, that onClick

ActionBarActivity with TabHost

╄→尐↘猪︶ㄣ 提交于 2019-12-24 19:16:42
问题 I am developing an app, with minimum sdk level 7 and that's why I use support library and ActionBarActivity to have a proper ActionBar, but also the layout of my page contains four tabs on the bottom of the activity, and as i already extend ActionBarActivity, I cannot extend TabActivity. The problem is when I write public class HomePageActivity extends ActionBarActivity { private TabHost mTabHost; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState