I am trying to get my app to be backward compatible so i need to show the menu button since we used the menu button in our app on previous versions.
So I was reading and it says that if your target is 11 (3.0) than you don't get the menu button but it your target is 10 they you do.
But the issue is I am using fragments so my target has to be 11.
Any thoughts.
Ordinary options menus will appear regardless of Android version. If you have:
android:targetSdkVersion="11"
then the options menu will appear in the action bar on Android 3.0+ devices. All items in the options menu will be available when clicking the "overflow" button in the upper-right corner. Your options menu will appear normally on Android 1.x and 2.x devices, even if you have android:targetSdkVersion="11"
in your <uses-sdk>
manifest element.
If you overrode the MENU button to have other behavior, you will need to create some other trigger for that behavior for API Level 11 and higher. Overriding the MENU button was never a good idea to begin with, and as you can see, it is even less of a good idea now. I know of no way to get a MENU button on an Android 3.0 device if you have android:targetSdkVersion="11"
.
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