【问题标题】:How use Android Action Bar Style Generator?如何使用 Android 操作栏样式生成器?
【发布时间】:2014-01-22 01:47:05
【问题描述】:

很抱歉,但我搜索并没有找到这么容易的东西 =/,我从 http://jgilfelt.github.io/android-actionbarstylegenerator/ 下载我的操作栏主题并将文件放在正确的位置,但是当我执行我的应用程序时没有发生,操作bar 是我把它放在样式中的默认值:

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

我的主题名称是 Barraacao,我用 AppCompat 制作了我的 android 应用程序的主题,请有人给点建议?

【问题讨论】:

  • 尝试删除&lt;item&gt;并将parent更改为Theme.Barraacao
  • 您是否更新了清单 xml 中的主题?
  • 不,请问我如何更新?

标签: android android-layout android-actionbar


【解决方案1】:

AppCompat 有更多 .Light 的主题,因此请尝试 @CommonsWare 评论或直接将您的主题放入清单中:

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Barraacao">

对我来说没问题。

看:http://www.androiduipatterns.com/2012/09/creating-custom-android-styles-easy-way.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-08-19
    • 2013-08-07
    • 1970-01-01
    • 2014-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多