How to show copy-paste options (Context menu) for MultiAutoCompleteTextView on button click?
Asked Answered
S

0

4

I am trying to show context menu (copy-paste options) for MultiAutoCompleteTextView when clicked on button. Here is what I have tried but did not work.

mButton.setOnLongClickListener(new OnLongClickListener() {
        @Override
        public boolean onLongClick(View v) {
            // the below line didn't work either.
            //mAutoCompleteTextView.showContextMenu();
            mAutoCompleteTextView.performLongClick();
            return true;
        }
    });

Is there any way to show context menu? Menu is shown when I long press MultiAutoCompleteTextView, but I need to achieve same functionality when long clicked on any other view on the activity.

Santoyo answered 9/11, 2017 at 6:34 Comment(1)
Did you find solution for this?Contradistinguish

© 2022 - 2024 — McMap. All rights reserved.