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();
}
});
精彩评论