Tag: android-actionbar

Switching between Android Navigation Drawer image and Up caret when using fragments

When using the Navigation Drawer the Android devs are recommending that in the ActionBar “only those screens that are represented in the Navigation Drawer should actually have the Navigation Drawer image” and that “all other screens have the traditional up carat.” See here for details: http://youtu.be/F5COhlbpIbY I’m using one activity to control multiple levels of […]

Difference between ActionBarSherlock and ActionBar Compatibility

What is the difference between ActionBarSherlock and Action Bar Compatibility Fews days ago Google just released the ActionBar Compatibility that make me so confused. Is that the Action Bar Compatibility works same as the ActionBarSherlock and is the coding same? Example : Does app icon to navigate “up” or ActionBar.Tab supported in Action Bar Compatibility […]

How to force use of overflow menu on devices with menu button

I’d like to have all of the menu items that don’t fit into the ActionBar go into the overflow menu (the one that is reached from the Action Bar not the menu button) even on devices that do have a Menu button. This seems much more intuitive for users than throwing them into a separate […]

How to get the ActionBar height?

I am trying to get the height of the ActionBar (using Sherlock) every time an activity is created (specially to handle configuration changes on rotation where the ActionBar height might change). For this I use the method ActionBar.getHeight() which works only when the ActionBar is shown. When the first activity is created for the first […]

getActionBar() returns null

I’m having an odd problem. I am making an app with targetsdk 13. In my main activity’s onCreate method i call getActionBar() to setup my actionbar. This works fine when running on the Android 3.2 emulator, but when using Android 3.0 and 3.1 the getActionBar() method returns null. I find this extremely odd, and i […]

ActionBar text color

how can I change the text color of the ActionBar? I’ve inherited the Holo Light Theme, I’m able to change the background of the ActionBar but I don’t find out what is the attribute to tweak to change the text color. Ok, I’m able to change the text color with the attribute android:textColorPrimary but it […]

Full Screen Theme for AppCompat

I would like to know how can I apply full screen theme ( no title bar + no actionbar ) to an activity. I am using AppCompat library from support package v7. I’ve tried to applied android:theme=”@android:style/Theme.NoTitleBar.Fullscreen” to my specific activity but it crashed. I think it’s because my application theme is like this. <style […]

How do I hide a menu item in the actionbar?

I have an action bar with a menuitem. How can I hide/show that menu item? This is what I’m trying to do: MenuItem item = (MenuItem) findViewById(R.id.addAction); item.setVisible(false); this.invalidateOptionsMenu();

Display Back Arrow on Toolbar Android

I’m migrating from ActionBar to Toolbar in my application. But I don’t know how to display and set click event on Back Arrow on Toolbar like I did on Actionbar. With ActionBar, I call mActionbar.setDisplayHomeAsUpEnabled(true). But there is no the similar method like this. Has anyone ever faced this situation and somehow found a way […]

How do I change the background color of the ActionBar of an ActionBarActivity using XML?

Details: I’m extending ActionBarActivity. Eclipse and SDK fully patched as of 2011-11-06. <uses-sdk android:minSdkVersion=”4″ android:targetSdkVersion=”14″ /> Deployed to Samsung device with Android 2.3.3 Application has android:theme=”@android:style/Theme.Light” Issue: application is light, but ActionBar is blue with grey icons, hardly visible against the blue background color. I also want the ActionBar to be light, so they grey […]

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