1

can someone help me with Android system copy/paste popup? I want to hide it when a user clicks at some button because now popup overlaps drawer layout. But I need this popup. I just want to hide it when click drawer button.

Warble
  • 135
  • 1
  • 11

4 Answers4

1

Use android:longClickable="false" in your editText it will work

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
1

There is something wrong with your design because when you create drawer, fragments rest behind the drawer. So that popup should not overlap above navigation drawer. You can find more stuff here https://developer.android.com/training/implementing-navigation/nav-drawer

Kishan Solanki
  • 13,761
  • 4
  • 85
  • 82
1

Resolved by adding mDrawerLayout.requestFocusFromTouch() when opening drawer.

Warble
  • 135
  • 1
  • 11
0

You can also use this in onCreate :

edittext.setLongClickable(false);
        edittext.setTextIsSelectable(false);
        edittext.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) {
                }
            });
Siros Baghban
  • 406
  • 4
  • 7