I'm trying to create custom selection menu but it does not work on a device wit MIUI rom. Devices with Android + MIUI setCustomSelectionActionModeCallback not working.
Long press the edit text area and select text in the EditText to listen the action mode callback. Custom action mode not work.
editText.setCustomSelectionActionModeCallback(new android.view.ActionMode.Callback() {
@Override
public boolean onCreateActionMode(android.view.ActionMode mode, Menu menu) {
Log.d(LOG_TAG, "onCreateActionMode");
return true;
}
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
Log.d(LOG_TAG, "onPrepareActionMode");
return false;
}
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
return false;
}
@Override
public void onDestroyActionMode(ActionMode mode) {
}
});
I have a raised a complaint on MIUI forum - http://en.miui.com/thread-7072028-1-1.html
Is there any workaround for this problem?