Skip to content Skip to sidebar Skip to footer

Styling Android Action Bar

I've a newly created project and the first thing I want to do is add and style an action bar. I made it the way they tell in their official tutorials and even tried some other ways

Solution 1:

Per the Using the Material Theme training, the Material theme (and AppCompat theme's which backport / use Material theming) use colorPrimary to color the action bar. Therefore your theme can be:

<stylename="AppTheme"parent="@style/Theme.AppCompat.Light.DarkActionBar"><itemname="colorPrimary">@color/blue</item></style>

You'll find more details on how to theme using AppCompat / Material in the AppCompat v21 blog post and in this pro-tip

Solution 2:

I recommend you use this tools to generate ActionBar styles:

http://jgilfelt.github.io/android-actionbarstylegenerator/

Good Luck!

Post a Comment for "Styling Android Action Bar"