更改操作栏中的溢出图标 [英] Changing overflow icon in the action bar

查看:123
本文介绍了更改操作栏中的溢出图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能改变操作栏中溢图标?我有蓝色图标的所有动作条项目,我也希望它出现时改变溢图标。

Is it possible to change the overflow icon in the action bar? I have blue icons for all ActionBar items and I also want to change the overflow icon when it appears.

推荐答案

您可以用一种风格,但你必须把它添加到主旋律声明。

You can with a style, but you have to add it to the main Theme declaration.

<resources>
    <!-- Base application theme. -->
    <style name="Your.Theme" parent="@android:style/Theme.Holo">
        <!-- Pointer to Overflow style ***MUST*** go here or it will not work -->
        <item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
    </style>

    <!-- Styles -->
    <style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
        <item name="android:src">@drawable/ic_action_overflow</item>
    </style>

</resources>

您还可以动态地改变它,这是我细讲这里:

You also can change it dynamically, which I go into detail about here:

改变Android的溢出菜单图标编程

这篇关于更改操作栏中的溢出图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆