Is there any way to programmatically start contextual action bar associated with a text view, on a button click? It should contain default options of copy/select all as well. Basically, I want to show the selection handles in my text view and the android default copy/select all option in action bar, on a button click (instead of long click/double tap).
What I tried so far: tried using the setCustomActionModeCallback() api, but problem here, is user need to long press/double click the text view for CAB to appear. Tried using startActionMode() api, but could not find a way to retain default items.. it just opens a new empty CAB.. I know, I can add my custom copy-select all code and make use of this empty CAB, but I want to use the default Android provided one instead of managing it by myself.
Edit; I can't use EditText. The view need to be TextView only and long click will be disabled. I am doing all the above changes by setting TextView as selectable