开发者

Display options menu using onClickListener

开发者 https://www.devze.com 2023-03-28 17:37 出处:网络
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 t

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

精彩评论

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