Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Menu Button is not working

 
Bharath Bg
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i hav created XML for the menu layout and i am inflating the same, the code doesnt give any compilation errors but when i click on menu button menu wont appear, here is the code :

public boolean onCreateOptionMenu(Menu myMenu)
{
super.onCreateOptionsMenu(myMenu);

addRegularMenuItems(myMenu);

//this.myMenu=menu;
//MenuInflater inflater = getMenuInflater();
//inflater.inflate(R.menu.menu, menu );

return true;
}



XML is like this



<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/menu"
>
<group
android:id="@+id/grour_menu" >
<item
android:id="@+id/list_menu"
android:title="List"
android:orderInCategory="0" android:visible="true" android:enabled="true" android:menuCategory="system"/>

<item
android:id="@+id/find_menu"
android:title="Find"
android:orderInCategory="1" android:visible="true" android:enabled="true" android:menuCategory="system"/>

<item
android:id="@+id/help_menu"
android:title="Help"
android:orderInCategory="2" android:visible="true" android:enabled="false" android:menuCategory="system"/>

<item
android:id="@+id/mylist_menu"
android:title="My List"
android:orderInCategory="3" android:visible="true" android:enabled="false" android:menuCategory="system"/>
</group>
</menu>


please help me out in solving the problem
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bharath,
Try this

Hope it'll work for You
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic