my dog learned polymorphism*
The moose likes Android and the fly likes Menu Button is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Menu Button is not working" Watch "Menu Button is not working" New topic
Author

Menu Button is not working

Bharath Bg
Greenhorn

Joined: Jul 28, 2009
Posts: 1
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

Joined: Apr 02, 2009
Posts: 52
Hello Bharath,
Try this

Hope it'll work for You
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Menu Button is not working
 
Similar Threads
how to add a scrollbar to a view
Layouts, bottom position
How to stop handler or thread
The application has stopped unexpectedly. Please try again.
Problems with listview and checkbox event