I created a basic project with "Minimum required SDK" API 11 to test Action Bar. Instead of showing action buttons on bar they ended up in action overflow, even the bar was empty. I used the following code.
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
android:showAsAction="ifRoom"/>
But it started to show action buttons when I added the following namespace.
xmlns:app="http://schemas.android.com/apk/res-auto"
and changed the android:showAsAction="ifRoom"
to app:showAsAction="ifRoom"
.
As far as I know android:showAsAction="ifRoom"
should work in API 11 and above.
Please help to clear this out.
android:showAsAction= "always"
xmlns:app="http://schemas.android.com/apk/res-auto"
namespace, which supposed to do for API 10 or less.