I am looking to create a custom menu for selecting text. I know that you can edit the behavior of the action bar using setCustomSelectionActionModeCallback, but in my case I do not want this action bar to be displayed at all, I want my own floating user menu to be reached.
The only thing is that it is not possible to display the action bar menu after selecting text in a TextView.
The behavior I need is not a standard abbreviation / copy / paste, the actions that I implemented are designed to highlight and save the selected part of the text in the database.
I did a bit of work, and the best I could do was the idea of ββrandom thinking, as a result of which I returned false in onCreateActionMode and got links to select text using reflection. That half worked, and it's just as good, because any form of reflection in this case is a very bad practice.
My hope was that the last support library would include a floating text menu in 6.0, and although I could implement my own custom view in this menu, it is wishful thinking.
If anyone has ideas or libraries that might be useful, I'm all ears.
Conti source share