Tag: android-actionbar

Can't get the Android 4.0 Split Action Bar working

I’ve followed the development pages on the android dev site, but I cannot get my action bar to split to the top and bottom of the screen. I’ve got a menu xml defined with a couple of options: <?xml version=”1.0″ encoding=”utf-8″?> <menu xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:id=”@+id/stop_services” android:icon=”@drawable/ic_launcher” android:title=”@string/stop” android:showAsAction=”ifRoom|withText”/> <item android:id=”@+id/start_services” android:icon=”@drawable/pushpin” android:title=”@string/start” android:showAsAction=”ifRoom|withText”/> </menu> In […]

Android: Custom action bar,How to use entire width?

Here is an image of my custom action bar: I want to use the entire width, I have search the internet for a solution but nothing wotrked for me. Here is my action bar .xml: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent”> <ImageView android:layout_width=”50dp” android:layout_height=”match_parent” android:id=”@+id/invActionBarSave” android:src=”@drawable/ic_ok_b” android:nestedScrollingEnabled=”true” android:layout_alignParentRight=”true” android:background=”#ffb0afaf” android:paddingLeft=”8dp” android:paddingRight=”8dp” android:layout_marginTop=”4dp” android:layout_marginBottom=”4dp” /> […]

Android action Bar customization

my app is using using Sherlock action bar. my designer gave me a new design. the app logo need to be in the middle 2 action items to the left and 2 actionitems to the right of the logo the app logo height is 1.5 the size of the actionbar (it suppose to be a […]

Android action bar batch selection for versions prior to 3.0

I have a ListView for which I want to enable batch selection. For android 3.0 and above I’ve added a modal multi choice to the ListView and set the multi choice mode listener. How can I do the same for android versions prior to 3.0 (with or without a third party library) ? I’ve looked […]

Changing action overflow text color in the ActionBar

I have been struggling to change the text color of the Action Overflow item in the action bar. I use v7 AppCompat and Light theme with Dark actionbar. actionMenuTextColor doesn’t seems to do anything. I need to change it to a black text? Any ideas?

How to create an Back Button in Material Design

I cannot find a tutorial about adding this button in the Action bar in Material Design. How can I add this into the action bar on Lollipop?

Changing ActionBar and SearchView backgrounds

I was trying to use the Holo Light theme with dark action bars as recommended on android guidelines. This is my themes.xml file: <resources> <style name=”Theme.MyApp” parent=”@android:style/Theme.Holo.Light”> <item name=”android:actionBarStyle”>@style/Widget.MyApp.ActionBar</item> </style> <style name=”Widget.MyApp.ActionBar” parent=”@android:style/Widget.Holo.ActionBar”> <item name=”android:background”>@android:drawable/dark_header</item> <item name=”android:titleTextStyle”>@style/MyApp.ActionBar.TextAppearance</item> </style> <style name=”MyApp.ActionBar.TextAppearance” parent=”@android:style/TextAppearance”> <item name=”android:textColor”>@android:color/primary_text_dark</item> </style> </resources> The result without using the search interface is the expected, […]

Honeycomb actionbar and margins

I’m attempting to use a different “homeAsUpIndicator” graphic on the action bar, and I’m running into some margin issues with the edge of the screen and the graphic. Using the “android:homeAsUpIndicator” attribute with a value of @drawable/my_graphic in the styles.xml for the project, I’ve managed to change the indicator to a custom graphic. That graphic […]

Can't change the text color with Android Action Bar drop-down navigation

I’m using Drop-down Navigation with my Action bar, and I can’t get a sensible color for the corresponding text when using a dark action bar. The action bar itself is a dark grey, and the text color is black, so it’s very hard to read. I followed the basic instructions on the Action Bar developer’s […]

Change android EditText style from rectangular border to underscore

In one of my activities, my EditText views used to look like this But now they looks like this I need help changing it back: from the rectangle to the underscore. BACKGROUND Because I needed to create a custom ActionBar, I had to change the theme of the activity in question, YesterdayActivity, using the following […]

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