gpt4 book ai didi

android - 如何更改 DrawerToggle 的波纹颜色(后退箭头)

转载 作者:行者123 更新时间:2023-11-29 17:39:56 25 4
gpt4 key购买 nike

我想更改 DrawerToggle 的波纹颜色,但找不到任何方法。我的样式文件看起来像这样。这会更改其他菜单项的背景,但不适用于后退箭头。如何更改抽屉箭头的波纹颜色

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#FF0000</item>
<item name="colorPrimaryDark">#660000</item>
<item name="android:textColorPrimary">#FFFFFF</item>
<item name="android:textColorSecondary">@android:color/white</item>
<item name="android:actionMenuTextColor">@android:color/white</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="android:actionBarItemBackground">@drawable/my_ripple_borderless</item>
<item name="selectableItemBackground">@drawable/my_ripple</item>
<item name="android:selectableItemBackground">@drawable/my_ripple</item>
<item name="listChoiceBackgroundIndicator">@drawable/my_ripple</item>
<item name="android:listChoiceBackgroundIndicator">@drawable/my_ripple</item>
</style>


<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<!--<item name="spinBars">false</item>-->
<item name="color">@color/drawer_icon_color</item>
</style>

最佳答案

添加这个样式

<style name="AppTheme.Toolbar">
<item name="colorControlHighlight">@color/colorControlHighlight</item>
</style>

到你的工具栏

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:theme="@style/AppTheme.Toolbar"
app:popupTheme="@style/AppTheme.PopupOverlay" />

原回答: https://stackoverflow.com/a/30676995/2311651

关于android - 如何更改 DrawerToggle 的波纹颜色(后退箭头),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29102433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com