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:

enter image description here

my current menu

enter image description here

try removing android:orderincategory item


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -