gpt4 book ai didi

android - 如何更改选项菜单点的颜色?

转载 作者:IT王子 更新时间:2023-10-29 00:10:51 24 4
gpt4 key购买 nike

我想将选项菜单的点颜色更改为白色。我试图为此添加图像,但不起作用。如何做到这一点?

enter image description here

菜单xml:

 <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.siddhi.timetablelayout.Main2Activity">

<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never"
android:icon="@drawable/ic_more_vert_white_48dp"/>
</menu>

最佳答案

把它放在你的 AppTheme 中的 style.xml 中:

<!-- android:textColorSecondary is the color of the menu overflow icon (three vertical dots) -->
<item name="android:textColorSecondary">@color/white</item>

关于android - 如何更改选项菜单点的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35453953/

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