【发布时间】:2016-04-24 12:18:05
【问题描述】:
我从 styles.xml 更改了状态栏的颜色:
<resources>
<color name="custom_theme_color">#42A5F5</color>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimaryDark">@color/custom_theme_color</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
我还从 string.xml 更改状态栏的标题:
<resources>
<string name="app_name">Qu-easy</string>
<item name="colorPrimaryDark">@color/custom_theme_color</item>
</resources>
如何将标题设置在状态栏的中心? 我猜像gravity.center这样的东西?
【问题讨论】:
-
制作关于此的客户操作栏,然后标题参考此已接受的答案stackoverflow.com/questions/18418635/…
标签: java android android-actionbar statusbar