我刚刚创建了一个自定义res / values / styles.xml文件,以便我的ActionBar没有图标和标题,并且还指定了自定义溢出图标。它在Android 4.0+上看起来不错,但是当我在Android 3.0模拟器上运行它时,溢出图标已经消失。通过"消失"我的意思是,我不仅不能看到它,而且我也无法点击它(所以它不像它只是"融入" - 它&# 39;根本就不存在!)。
以下是我正在使用的res / values / styles.xml:
<resources>
<style name="AppBaseTheme" parent="android:Theme.Light">
</style>
<style name="AppTheme" parent="AppBaseTheme">
</style>
<style name="CustomAppTheme" parent="AppTheme">
<item name="android:actionBarStyle">@style/CustomActionBarWithoutTitleAndIcon</item>
<item name="android:actionOverflowButtonStyle">@style/CustomOverflowButton</item>
</style>
<style name="CustomActionBarWithoutTitleAndIcon" parent="android:Widget.Holo.Light.ActionBar">
<item name="android:displayOptions">useLogo</item>
</style>
<style name="CustomOverflowButton" parent="@android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:src">@drawable/ic_overflow</item>
</style>
</resources>
有人知道如何在Honeycomb上再次显示溢出图标吗?
答案 0 :(得分:2)
它没有显示,因为您正在使用menu hardware key
正如documentation所说:
The overflow icon only appears on phones that have no menu hardware keys.
Phones with menu keys display the action overflow when the user presses the key.