我试图在单击按钮时显示 MultiAutoCompleteTextView 的上下文菜单(复制粘贴选项)。
这是我尝试过但没有成功的方法。
mButton.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
// the below line didn't work either.
//mAutoCompleteTextView.showContextMenu();
mAutoCompleteTextView.performLongClick();
return true;
}
});
有什么办法可以显示上下文菜单吗?当我长按 MultiAutoCompleteTextView 时会显示菜单,但当长按活动的任何其他视图时我需要实现相同的功能。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)