5

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?

Click here to preview the image

Indirajith
  • 83
  • 7
  • duplicate of https://stackoverflow.com/questions/45165150/devices-with-android-miui-and-setcustomselectionactionmodecallback – ccpizza Mar 10 '20 at 21:27

0 Answers0