【发布时间】:2015-10-08 08:38:23
【问题描述】:
我正在开发一个最低 API 级别 10 (2.3.3) 的 android 应用程序,并且我使用工具栏作为我的操作栏。主页图标和溢出图标以及标题文本颜色在 Honeycomb 和上面都是白色的,这就是我想要的。问题出在蜂窝下方,主页图标、溢出图标和标题颜色是黑色的,我希望它们也是白色的。我该怎么做。下面是我的代码。
styles.xml
<style name="Theme.DesignDemo" parent="Base.Theme.DesignDemo">
</style>
<style name="Base.Theme.DesignDemo" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="colorAccent">@color/accent</item>
<item name="android:windowBackground">@color/window_background</item>
<item name="android:windowAnimationStyle">@style/MyAwesomeAnimation</item>
</style>
工具栏
<android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
【问题讨论】:
-
你最后解决了这个问题吗?
标签: android android-actionbar toolbar