正文  基础知识 > 程序示例 >

actionbar菜单背景色

<resources> <style name="Theme.Example" parent="@style/Theme.AppCompat.<span sty...

<resources>

    <style name="Theme.Example" parent="@style/Theme.AppCompat.<span style="color:#ff0000;">Light</span>"></style>

    <style name="AppTheme" parent="Theme.Example">

        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
        <!-- <item name="android:itemBackground">@drawable/selectable_background_example</item> -->
        <!-- item背景色 黄色-->
        <item name="android:itemBackground">#ffff00</item>
        <!-- list背景色(分割线颜色)红色 -->
        <item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
        <item name="popupMenuStyle">@style/PopupMenu.Example</item>
    </style>

    <style name="PopupMenu.Example" parent="@style/Widget.AppCompat.Light.PopupMenu">

        <!-- <item name="android:popupBackground">@drawable/menu_dropdown_panel_example</item> -->
        <item name="android:popupBackground">#ff00ff</item>
    </style>

</resources>