在edittext长按创建上下文菜单。如何删除上下文菜单?我试过这个:
et.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
return true;
}
});
et.setCustomSelectionActionModeCallback(new ActionMode.Callback() {
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
return false;
}
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
return false;
}
public boolean onActionItemClicked(ActionMode actionMode,
MenuItem item) {
return false;
}
public void onDestroyActionMode(ActionMode actionMode) {
}
});
但后来我无法选择文本。