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 … Read more

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 … Read more

Can’t Find Theme.AppCompat.Light for New Android ActionBar Support

I am trying to implement the new ActionBar support library that was released by Google a couple days ago. In the past, I have successfully implemented ActionBarSherlock without any issues using the same method listed on Google Developer’s Support Library Setup page – using the guide on how to include the resources (which is similar … Read more

This Activity already has an action bar supplied by the window decor

Trying to move over my stuff to use Toolbar instead of action bar but I keep getting an error saying java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tyczj.weddingalbum/com.xxx.xxx.MainActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar … Read more

Display Back Arrow on Toolbar

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 … Read more

“Field can be converted to a local variable” message appearing when setting Android ActionBar colour

What the warning is telling you is that actionBarColor shouldn’t be a global variable (i.e. a field), because it’s only used in one method (onCreate). This is good advice: you should always minimize the scope of your variables, because it improves readability and reduces possibilities for programming errors. To get rid of the warning, fix the problem … Read more