好吧,我知道这是一个微不足道的问题,但由于某种原因它对我不起作用。我已经做了很多其他答案中建议的事情,但都是徒劳的。我的可绘制文件夹有白色图标。我什至尝试从 styles.xml 更改它,但这也不起作用。我正在我的棒棒糖设备上测试它。任何帮助将不胜感激。提前致谢。
这是我的清单文件的一部分。
<application
android:allowBackup="true"
android:icon="@drawable/ic_drawer"
android:label="@string/app_name" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"
tools:replace="android:value" />
<activity
android:name=".Activity_Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity_test"
android:launchMode="singleInstance"
android:theme="@style/AppTheme.Base"
android:windowSoftInputMode="stateHidden" />
最后这是我的 style.xml。 v-21 也类似。
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:actionMenuTextColor">#fff</item>
<item name="colorPrimary">@color/ColorPrimary</item>
<item name="colorPrimaryDark">@color/ColorPrimaryDark</item>
<item name="drawerArrowStyle">@style/MyDrawerArrowToggle</item>
<item name="windowActionBar">false</item>
<item name="colorAccent">#fff</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
</style>
你应该使用ThemeOverlay.AppCompat.Dark.ActionBar
作为您的工具栏样式。它设置colorControlNormal
to android:textColorPrimary
,对于深色主题为白色。并且它不会改变主要样式的其他属性。
<android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" >
...
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
</android.support.v7.widget.Toolbar>
同时删除drawerArrowStyle
从你的主要风格来看,它是不需要的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)