2016-02-17 29 views
14

Ich möchte die Farbe des Optionsmenüs in Weiß ändern. Ich habe versucht, ein Bild dafür hinzuzufügen, aber die Dosis funktioniert nicht. Wie macht man das?Wie ändert man die Farbe im Optionsmenü?

enter image description here

Menü 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> 

Danke.

Antwort

37

Sie können dies ändern:

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

einfachste .. Danke .. @ ayz4sci – Sid

+1

wo diese – bharv14

+2

setzen Legen Sie es in Ihrem style.xml. AppTheme. – ayz4sci

6

Sie können das Bild, das dafür verwendet wird, mithilfe der folgenden Stildeklaration ändern.

<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> 
Verwandte Themen