I am trying to show a context menu (copy-paste options) for a MultiAutoCompleteTextView when a button is clicked. Here is what I tried but didn't work.
mButton.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
mAutoCompleteTextView.performLongClick();
return true;
}
});
Is there a way to show the context menu? The menu is displayed when I click on the MultiAutoCompleteTextView for a long time, but I need to achieve the same functionality when you click on any other view of the action for a long time.
source
share