开发者

Display options menu using onClickListener

I was just wondering whether it is possible to display my options menu to be displayed when I click on a image. Now I have displayed my options menu when the menu button is clicked. But I would like to display it when the user clicks on开发者_StackOverflow中文版 my imageView too. Is this possible?


I found this to be so simple at last.

imageView.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
        openOptionsMenu();
        }
    });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜