Android action button pushed into overflow -
Android action button pushed into overflow -
i'm next android developers guide. have menu i'm inflating in action bar:
res/menu/main_activity_actions.xml
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <!--search, should appear action button --> <item android:id="@+id/action_search" android:icon="@drawable/ic_action_search" android:title="@string/action_search" android:showasaction="always" /> <!-- settings, should in overflow --> <item android:id="@+id/action_settings" android:title="@string/action_settings" android:showasaction="never"/> </menu>
i have corresponding icon in res/drawable, , inflating so:
@override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main_activity_actions, menu); homecoming true; }
the problem i'm facing search
action gets pushed overflow, , can't figure out how create action button shows in action bar.
i did not find duplicate question on this, though there many related questions.
android android-actionbar
Comments
Post a Comment