Styling Android Action Bar

后端 未结 2 1204
陌清茗
陌清茗 2021-01-27 13:05

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

相关标签:
2条回答
  • 2021-01-27 13:13

    I recommend you use this tools to generate ActionBar styles:

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

    Good Luck!

    0 讨论(0)
  • 2021-01-27 13:17

    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:

    <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="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

    0 讨论(0)
提交回复
热议问题