I am using v7 appcompat support library. The action items work showing in the actionBar just fine on either newer or older devices.
However, I don't get Overflow on API 7. For example:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:appcompat="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/menuAction"
android:icon="@android:drawable/ic_menu_directions"
android:title="@string/barButtonTitle"
appcompat:showAsAction="always|withText"/>
<item
android:id="@+id/menuAction1"
android:title="@android:string/untitled"
appcompat:showAsAction="never"/>
</menu>
appcompat:showAsAction="always|withText"
works, it shows as an Action Item in ActionBar. However, appcompat:showAsAction="never"
doesn't show in the Overflown as it does in newer platform. It is hidden on the bottom, and revealed when you pressed on the older menu button.
Is that the intended behavior from appcompat support library? or am I missing anything to get the Overflow working on the older platform?
Is that the intended behavior from appcompat support library?
Yes, it is
The overflow button (3 dots) is only shown if the devices don't have a hardware menu button.
Every gingerbread-device must have a menu-button, so the overflow button won´t show on API level 7
For more information about this topic, the following blog-post might be interesting: http://android-developers.blogspot.de/2012/01/say-goodbye-to-menu-button.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With