• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Menu Button is not working

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Bharath,
Try this

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