Reputation: 2724
I want to create an EditText with the following changes:
For the first, I guess I can create an OnTouchListener and return true immediately, but then it will block me from doing the second thing (which I have no idea how to do).
I looked for a command that gets the EditText into selection mode, but all I could find was a way to get the selected text from it...
Thanks!
EDIT: I successfully made 1 and 2, but the toolbar still shows (tried unregisterForContextMenu
)
Upvotes: 0
Views: 204
Reputation: 9429
you can use edittex.setCustomSelectionActionModeCallback
setCustomSelectionActionModeCallback(new Callback() {
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
return false;
}
public void onDestroyActionMode(ActionMode mode) {
}
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
return false;
}
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
return false;
}
});
this will be block to open contextmenu for edittex
Upvotes: 0