【问题标题】:Android - Title text not shown in Action Bar after customizationAndroid - 自定义后操作栏中未显示标题文本
【发布时间】:2014-05-31 10:25:23
【问题描述】:

我正在尝试对我的操作栏进行一些自定义,但是这样做,操作栏中的标题会消失,而背景颜色会正确更改。

有谁知道问题出在哪里?

提前谢谢你。

这是我的 .xml 文件:

<resources xmlns:android="http://schemas.android.com/apk/res/android">

<style name="AppTheme" parent="Theme.AppCompat.Light">
   <item name="android:actionBarStyle">@style/MyActionBar</item>
</style>

<style name="MyActionBar" parent="AppBaseTheme">
  <item name="android:background">@color/ActionBarColor</item>
</style>

</resources>

【问题讨论】:

    标签: android android-actionbar customization


    【解决方案1】:

    您的操作栏主题应该有@style/Widget.AppCompat.Light.ActionBar 的父级,而不是AppBaseTheme

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-30
      • 1970-01-01
      • 2018-07-16
      相关资源
      最近更新 更多