Android Menu when menu button is pressed -
i create menu appear on screen when menu button pressed. i've implemented , appears in bottom of page not like. code here image of trying achieve.
main.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/expandall" android:orderincategory="100" android:showasaction="always" android:title="expand all"/> <item android:id="@+id/collapseall" android:orderincategory="100" android:showasaction="withtext" android:title="collapse all"/> <item android:id="@+id/myprofile" android:orderincategory="100" android:showasaction="withtext" android:title="my profile"/> <item android:id="@+id/signout" android:orderincategory="100" android:showasaction="always" android:title="sign out"/> public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main, menu); return true; } @override public boolean onoptionsitemselected(menuitem item) { switch (item.getitemid()) { case r.id.collapseall: // single menu item selected collapseall(); return true; case r.id.expandall: expandall(); return true; } } my desired menu:

my current menu

try removing android:orderincategory item
Comments
Post a Comment