我不能使用,因为Theme.AppCompat.Light.DarkActionBar
的this HTC bug。
所以我一直试图找到一个解决办法。我试图删除DarkActionBar
,只是用Theme.AppCompat.Light
作为我的应用主题的父母;它解决了这一错误,但在我的行动吧一些项目出现黑色:
V7 ActionBarDrawerToggle,搜索查看控件,搜索查看文本,溢出菜单图标,菜单项文本:出现黑项目。
有没有一种方法,使他们所有的白?
使用工具栏:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:background="@color/blue"
android:layout_height="@dimen/actionbar_height"/>
而在风格和表现补充一点:
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/white</item>
<item name="colorPrimaryDark">@color/light_gray</item>
<item name="android:textColorPrimary">@color/white</item>
<item name="colorAccent">@color/white</item>
<item name="android:textColorPrimaryInverse">@color/white</item>
<item name="actionMenuTextColor">@color/white</item>
<item name="android:textColorSecondary">@color/white</item>
<item name="android:actionMenuTextColor">@color/white</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowBackground">@color/white</item>
</style>