2016-02-17 17 views
14

Tôi muốn thay đổi các màu của menu Tùy chọn thành màu trắng. Tôi đã cố gắng thêm hình ảnh cho điều này nhưng liều lượng không hoạt động. làm như thế nào?Làm cách nào để thay đổi màu của menu Tùy chọn chấm?

enter image description here

đơn 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> 

Cảm ơn bạn.

Trả lời

37

Bạn có thể thay đổi nó bằng cách sử này:

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

đơn giản nhất .. Cảm ơn bạn .. @ ayz4sci – Sid

+1

nơi để đặt – bharv14

+2

này Đặt nó trong style.xml của bạn. AppTheme. – ayz4sci

6

Bạn có thể thay đổi hình ảnh được sử dụng cho nó bằng cách sử dụng tờ khai kiểu sau đây.

<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> 
Các vấn đề liên quan