I am trying to implement a action bar in my app.I followed the method from this link http://developer.android.com/guide/topics/ui/actionbar.html If I keep the tragetSdkversion>= 11,Then it works fine. But If I add min sdk version>=11 then the buttons shows up as part of the options menu and not in the action bar. This happens for the tablet.please help
This is part of my manifest
<uses-sdk android:minSdkVersion="4"
android:targetSdkVersion="11"/>
This is my menu.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/edit"
android:title="Edit"
android:icon="@drawable/icon"
android:showAsAction="ifRoom" />
<item android:id="@+id/renarration"
android:title="Renarration"
android:icon="@drawable/icon"
android:showAsAction="ifRoom"/>
<item android:id="@+id/renarration1"
android:title="Renarration"
android:icon="@drawable/icon"
android:showAsAction="ifRoom"/>
<item android:id="@+id/renarration2"
android:title="Renarration"
android:icon="@drawable/icon"
android:showAsAction="ifRoom"/>
</menu>
In the same link you’re referring it says,
The Action Bar is included by default in all activities that target Android 3.0 or greater. Any application that targets Android 3.0 automatically receives this theme. An application is considered to “target” Android 3.0 when it has set either the android:minSdkVersion or android:targetSdkVersion attribute in the element to “11” or greater.
In this example, the application requires a minimum version of API Level 4 (Android 1.6), but it also targets API Level 11 (Android 3.0). This way, when the application is installed on a device running Android 3.0 or greater, the system applies the holographic theme to each activity, and thus, each activity includes the Action Bar.
However, if you want to use Action Bar APIs, such as to add tabs or modify Action Bar styles, you need to set the android:minSdkVersion to “11”, so you can access the ActionBar class.