Tag: android-actionbar

How to hide action bar for fragment?

How can I hide action bar for certain fragment? I have searched for the answer at stackoverflow, but I have only found a solution, which involves disabling action bar for main activity in android manifest. Since I need to disable action bar for one fragment, this is not an option. Any ideas? Thanks. EDIT: min […]

Android – Activity Home/Up arrow has additional padding/margin with SDK 24

I’ve just updated my app from using SDK 23 to SDK 24. A problem has arisen for my activities that have show the Up/Home arrow (i.e., getSupportActionBar().setDisplayHomeAsUpEnabled(true)) in that there is now additional (unwanted) space between the Up arrow and the activity title. For activities that don’t have an Up arrow, the activity title is […]

Overlaying the Action Bar not working

I was following official developer’s guide to overlay actionbar. my style.xml is as following: <!– Base application theme. –> <style name=”AppBaseTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <!– Customize your theme here. –> </style> <style name=”AppTheme” parent=”AppBaseTheme”> <item name=”actionBarStyle”>@style/CustomActionBarTheme</item> </style> <style name=”CustomActionBarTheme” parent=”@android:style/Theme.Holo”> <item name=”android:windowActionBarOverlay”>true</item> </style> My midSdkVersion is 14 and expected output is similar to that on official guide:. […]

How to hide the actionbar before the Activity is loaded?

My goal is to show a splash screen on my applications startup. Right now what it will do is briefly show the actionbar with an otherwise blank page, then jump to the splash screen. I’m trying to figure out how to not show the beginning screen and just start with the splash screen. I’m trying […]

On/Off Toggle Button in Preferences & Action Bar – Ice Cream Sandwich Style

I am referring to the blue ON/OFF styling as seen in the default Android Settings app on ICS phones. It can also be seen here: http://android-developers.blogspot.com/2012/02/android-design-v2-now-with-stencils.html I want to put them in a Preference screen, would I have to use a custom preference widget? Also, is it easy to put toggle buttons in the Action […]

Android actionbar spinner selected item, subtitle and dropdown list

How can I make spinner in action bar to have different item as selected (shown in the action bar top) then the one in the drop down list? Example is google mail with spinner in action bar: How did they achieve this functionality? Could I change selected item in action bar without affecting the same […]

How to use the Holo.Light theme but have the ActionBar use Holo withouth ICS?

I would like to have a dark ActionBar but have the rest of the application use the Holo.Light theme. I know there is a Theme.Holo.Light.DarkActionBar Theme in ICS/4.0 but I want this also to work in Honeycomb/3.0+. At the Moment I’m using the dark Holo theme and for the rest of my components I’m using […]

How to change color of Selected Tab

How to change color of tab when its selected, see below screen shot: i am showing Orange color in ActionBar, in a same way i wanna show orange color in place of light blue. To show Orange color in ActionBar background, i am using below code: <?xml version=”1.0″ encoding=”utf-8″?> <resources xmlns:android=”http://schemas.android.com/apk/res/android”> <style name=”Theme.MyAppTheme” parent=”android:style/Theme.Holo.Light”> <item […]

Hide Items in Context Action Bar (CAB) dynamically when multiple items are selected

I have a listActivity that shows CAB on long click. If more than 1 item is selected I would like to hide one of my menu items. I keep track of the # of items selected in onItemCheckedStateChanged(). However I don’t have access to the menu to remove the item from this function. See comments […]

Change Action Bar onPressed color

I cannot figure out how to change the action bar items “onPressed” color on Android. I’m not talking about the action bar background color but about the blue over state. How can I change the color of this or at least get rid of it? For instance the App Icon with the homeAsUpIndicator. I tried […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.