I want to provide simple formatting buttons for EditText, for example, a button that inserts <strong></strong>if no text was selected, and otherwise wraps around the selected text in the tags <strong>.
I am using v7 support library with ActionBarCompat. I was able to run custom ActionModewhen changing my focus EditText. However, when I touch the text in this for a long time EditText, another menu opens ActionModewith the copy / paste / ... buttons, which are supposedly the default behavior of Android. How can I suppress this second menu, but still allow the user to select parts of the content EditText?
Alternatively, I would like to be able to customize the default menu using setCustomSelectionActionModeCallback(...), but using the support library. How can i do this?
source
share