Tag: android-actionbar

Android Navigation Drawer and windowActionBarOverlay = true

I’m trying to implement the new Android Navigation Drawer in my application. I have created a BaseActivity.java that handles the Drawer setup and listeners, and I have two subactivities that extend this base class. On the second activity, I plan to use a different action bar style, using the following attrs: <item name=”android:windowActionBarOverlay”>true</item> <item name=”android:background”>@android:color/transparent</item> […]

What happened to windowContentOverlay in Android API 18?

After upgrading my phone to Android 4.3 I noticed the shadow below the actionbar is not showing anymore. In my app I’ve got a custom shadow using windowContentOverlay: <item name=”android:windowContentOverlay”>@drawable/shadows_bottom</item> It’s always been showing but now it’s gone on API 18. Removing that line from the theme doesn’t change anything. while on other API versions […]

How to style text in action overflow menu on device with Android>4.0 and hardware button?

I would like custom background & text color for my overflow menu. It works fine with devices without hardware menu button, but I’m not able to style devices with hardware menu button. See the screenshots: I’m using these styles: <style name=”Theme.settleup” parent=”@style/Theme.Sherlock.Light.DarkActionBar”> <item name=”android:popupMenuStyle”>@style/settleup_PopupMenu</item> <item name=”android:actionMenuTextColor”>@android:color/white</item> </style> <style name=”settleup_PopupMenu” parent=”@style/Widget.Sherlock.ListPopupWindow”> <item name=”android:popupBackground”>@drawable/menu_dropdown_panel_settleup</item> </style>

Force overflow menu in ActionBarSherlock

I want the 4.0+ overflow menu to be used on pre ICS devices (2.3 – 2.1). I’m using HoloEverywhere with ActionBarSherlock. I tried the following solution: ActionBarSherlock & HoloEverywhere – Forcing Overflow? but it does not work because absForceOverflow does not exist. Was it removed in the newest version or something? I’ve checked the R […]

Error implementing Support Library Action Bar

I’m trying to implement the new v7 Support Library ActionBar. However, I can’t get it to run properly. Here’s the exception 07-25 09:30:01.704: E/AndroidRuntime(9175): FATAL EXCEPTION: main 07-25 09:30:01.704: E/AndroidRuntime(9175): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable 07-25 09:30:01.704: E/AndroidRuntime(9175): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:98) 07-25 09:30:01.704: E/AndroidRuntime(9175): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 07-25 09:30:01.704: E/AndroidRuntime(9175): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 07-25 09:30:01.704: E/AndroidRuntime(9175): at com.cidaut.termoweb.MainActivity.onCreate(MainActivity.java:23) 07-25 09:30:01.704: E/AndroidRuntime(9175): […]

Android Navigation Drawer over the tabs

I am using the new navigation drawer available from the support library. When using the drawer along with tabs, the drawer menu is getting displayed below the tabs as shown below. How can i make sure the drawer menu is shown on the tabs. (It should display the drawer menu as if there are no […]

No App Icon on ActionBar

There are a lot of queries here about adding icons to ActionBar but none solved my problem. If you know a duplicate of this question, feel free to comment or close this question. I migrated my project to IntelliJ and I didn’t encounter this problem with my previous IDE (Eclipse). PROBLEM: The app icon is […]

Clicking app icon doesn't trigger onOptionsItemSelected()

I’m currently working on an Android app. I would like to use the app icon in the action bar to navigate to the “home” activity. I read on this page that all that needs to be done is to add an onOptionsItemSelected and look for the id android.R.id.home. This is the code that I have […]

The application icon does not show on action bar

I followed up the instructions of building a new android project and I got a runnable one except a problem with action bar. The problem is that the application icon is not showed beside the application title on action bar. I created the project with the configuration below: Minimum required SDK:API 8: Android 2.2(Froyo) Target […]

Set up toolbar as actionbar in fragment

I want to set up my toolbar as an actionbar, but since your toolbar is a layoutelement it has to be in your layout. Now my layout is in my fragment. I added the toolbar in my layout and I call it within my fragment: //Toolbar Toolbar toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar); It works because I […]

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