单击右上角三重冒号时,我已成功更改菜单项的文本颜色。
这也是第一个白色文本,但我设法使用工具栏主题更改它。 但是,当长按设备的任务按钮时,它会有所不同。它出现在底部加上我的菜单项是白色的。
我做了很多textColor改变我的基本主题,但都没有工作
styles.xml
<resources>
<!-- Base application theme without actionbar. -->
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Set color of the ToolBar -->
<item name="colorPrimary">@color/colorPrimary</item>
<!-- Set color of the StatusBar -->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<!-- Set color of the Accent -->
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorAlertDialogListItem">@color/primary_text</item>
<item name="android:actionMenuTextColor">@color/primary_text</item>
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="android:textColorSecondary">@color/primary_text</item>
<item name="android:textColor">@color/primary_text</item>
</style>
<style name="AppTheme.Normal" parent="AppTheme.Base">
<!-- Set color of the ToolBar -->
<item name="colorPrimary">@color/colorPrimary</item>
<!-- Set color of the StatusBar -->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<!-- Set color of the Accent -->
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="android:textColorSecondary">@color/primary_text</item>
<item name="android:textColor">@color/primary_text</item>
</style>
<!-- App theme no action bar -->
<style name="AppTheme" parent="AppTheme.Base">
<!-- Customize your theme here. -->
</style>
<!-- Toolbar Theme -->
<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Light">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColorSecondary">@color/white</item>
<item name="android:textColor">@color/primary_text</item>
</style>
<!-- App alert dialog theme -->
<style name="AppTheme.AlertDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/colorAccent</item>
</style>
<!-- App Design Tab Layout -->
<style name="AppTheme.SampleTabLayout" parent="Widget.Design.TabLayout">
<item name="tabIndicatorColor">@android:color/white</item>
<item name="tabIndicatorHeight">@dimen/tabIndicatorHeight</item>
<item name="tabSelectedTextColor">@android:color/white</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
</style>
<!-- Tab Text Appearance -->
<style name="AppTheme.SampleTabLayout.TextAppearance" parent="TextAppearance.Design.Tab">
<item name="android:textColor">@android:color/white</item>
<item name="android:padding">0dp</item>
<item name="android:textAllCaps">true</item>
</style>
<!-- TabLayout -->
<style name="AppTheme.TabLayout" parent="Widget.Design.TabLayout">
<item name="tabIndicatorColor">@color/colorPrimary</item>
<item name="tabIndicatorHeight">@dimen/tabIndicatorHeight</item>
<item name="tabSelectedTextColor">@android:color/white</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
</style>
<!-- Tab Text Appearance -->
<style name="AppTheme.TabLayout.TextAppearance" parent="TextAppearance.Design.Tab">
<item name="android:textColor">@android:color/white</item>
<item name="android:padding">0dp</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<!-- Tab Text Appearance -->
<style name="AppTheme.KenzaiProgressBar.Indeterminate" parent="Widget.AppCompat.ProgressBar">
<item name="android:indeterminateDrawable">@drawable/kenzai_animated_image_load</item>
<item name="android:layout_width">@dimen/kenzai_progressbar_width_and_height</item>
<item name="android:layout_height">@dimen/kenzai_progressbar_width_and_height</item>
<item name="android:indeterminate">true</item>
</style>
我该如何解决这个问题?
修改: 正在搜索设备的任务/最近按钮的清晰定义,找到此https://android.stackexchange.com/questions/32697/what-is-the-offical-name-of-the-third-on-screen-button
答案 0 :(得分:0)
我刚刚解决了它..它非常依赖于ToolbarTheme的textColorSecondary 所以改变文字颜色而不改变白色的抽屉箭头颜色就行了
<!-- Toolbar Theme -->
<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Light">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColorSecondary">@color/primary_text</item>
<item name="android:textColor">@color/primary_text</item>
<item name="colorControlNormal">@color/white</item>
</style>