creating menu in Android [closed]
I am creating android application which involves menu.Can anyone provide me the sample code code of creating menu. Thanks in advance
Tushar
http://developer.android.com/guide/topics/ui/menus.html
For your pleasure, some code:
@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.context_menu, menu);
}
Just have a look at the android documentation
精彩评论