更改操作栏中的溢出图标栏中、图标、操作

由网友(人生就是不停的战斗╰)分享简介:是否有可能改变操作栏中溢图标?我有蓝色图标的所有动作条项目,我也希望它出现时改变溢图标。Is it possible to change the overflow icon in the action bar? I have blue icons for all ActionBar items and I also...

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

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的溢出菜单图标编程

阅读全文

相关推荐

最新文章