欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

actionbar默认图标更改

程序员文章站 2024-01-04 18:48:40
...
    <!-- Application theme. -->
    <style name="AppTheme" parent="AppBaseTheme">

        <!-- colorPrimary is used for the default action bar background -->
        <item name="colorPrimary">@color/actionbar_backgroud</item>

        <!-- colorPrimaryDark is used for the status bar -->
        <item name="colorPrimaryDark">@color/actionbar_backgroud_dark</item>
        <!-- theme UI controls like checkboxes and text fields -->
        <!-- <item name="android:colorAccent">@color/actionbar_backgroud</item> -->
        <item name="android:actionModeBackground">@color/actionbar_backgroud</item>
        <!--更改home返回按钮的图标-->
        <item name="android:homeAsUpIndicator">@drawable/ic_actionbar_home</item> 
        <!--溢出菜单样式-->
        <item name="android:actionOverflowButtonStyle">@style/OverFlowButtonStyle</item> 
        <item name="android:actionModeCloseDrawable">@drawable/ic_actionbar_home</item>
        <item name="android:windowContentOverlay">@null</item>
    </style>

    <!--更改溢出菜单的图标-->
    <style name="OverFlowButtonStyle" parent="Widget.AppCompat.Light.ActionButton.Overflow">
        <item name="android:src">@drawable/ic_actionbar_overflow</item>
    </style>
    

 

上一篇:

下一篇: