How to enable bottom menu button in android 4.0 IC

2019-02-17 22:38发布

问题:

I want to enable bottom menu button and Which theme will be use for this menu button.I try many theme but did not work for me by the any theme.How can I achieve this?. Thanks in Advance.

回答1:

set android:targetSdkVersion="8" in manifest.xml , Image is taken from Samsung galaxy nexus

Example

<uses-sdk
    android:minSdkVersion="8"
    android:maxSdkVersion="17"
    android:targetSdkVersion="8" />


回答2:

If your target-sdk is <4.0, you are not using support library in your project, and if you haven't used ActionBarSherlock then this overflow menu should appear automatically, if you've overriden onOptionCreateMenu() method, on phones that only have soft buttons.



回答3:

If you set your targetSdkVersion in the manifest to 10 or less Android assumes your app depends on a menu button and will show it. Otherwise, menu items are available in the action bar.