开发者

creating menu in Android [closed]

It's dif开发者_StackOverflowficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜