Problem in loading Menu Button

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problem in loading Menu Button

Postby Emperor » Sat Aug 01, 2009 8:29 am

Hi

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;
}



menu.xml is like this which is placed inside res/menu



<?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
Emperor
Freshman
Freshman
 
Posts: 7
Joined: Thu Jul 30, 2009 4:36 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests