Search code examples
androidcheckboxandroid-toolbaroverflow-menu

Android Overflow Menu Checkbox Color


Is there a way to change the color of the checkbox in an android overflow menu.

My Current Checkbox is this:

 <item android:title="Completed"
    android:checked="false"
    android:checkable="true"
    android:id="@+id/completed"
   >

</item>

Solution

  • It could be set in your Activity theme

    <item name="colorAccent">@color/accent</item>
    

    Or you could also specifically style your toolbar to override it's own themes like this

    <!-- Toolbar -->
    <style name="toolbar_style" parent="">
        <item name="popupTheme">@style/toolbar_popup_style</item>
        <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
    </style>
    
    <style name="toolbar_popup_style" parent="Theme.AppCompat">
        <item name="colorAccent">@color/accent1</item>
    </style>
    

    then wherever your toolbar layout is

    <android.support.v7.widget.Toolbar
        style="@style/toolbar_style"