How to change Options menu dots color? [duplicate]

不羁岁月 提交于 2019-11-27 11:56:09

问题


This question already has an answer here:

  • Change color of the overflow button on ActionBar 13 answers

I want to change Options menu's dots color to white. I tried to add image for this but dose not work. How to do this?

menu 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>

Thank you.


回答1:


Put it in your style.xml in AppTheme:

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



回答2:


You can change the image used for it using the following style declaration.

<style name="MyCustomTheme" parent="style/Theme.Holo">
<item name="android:actionOverflowButtonStyle">@style/MyCustomTheme.OverFlow</item>

</style>

<style name="MyCustomTheme.OverFlow">
<item name="android:src">@drawable/my_overflow_image</item>

</style>


来源:https://stackoverflow.com/questions/35453953/how-to-change-options-menu-dots-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!