是否可以更改操作栏中的溢出图标?我的所有 ActionBar 项目都有蓝色图标,我还想在溢出图标出现时更改它。
最佳答案
您可以使用样式,但必须将其添加到主主题声明中。
<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>
您也可以动态更改它,我在这里详细介绍:
关于android - 更改操作栏中的溢出图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9733312/