Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是想知道单击图像时是否可以显示要显示的选项菜单。现在,当单击菜单按钮时,我已经显示了我的选项菜单。但是我也想在用户点击我的 imageView 时显示它。这可能吗?
我终于发现这很简单。
imageView.setOnClickListener(new OnClickListener() { public void onClick(View v) { openOptionsMenu(); } });