Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing the EditText context menu in Android

Is there a way to add a custom case to the existing context menu in Android? We all have a context menu that is called on the active EditText view, the one with "Input Type" and other. What I need is to add another case to this menu, say "Options". I honestly searched for info on Android Developers, but no luck over there. They only write about creating your own menu from scratch. I don't need to change it systemwide as this guy does. My only concern is to change it in one activity of my app, one instance of EditTextto be precise.

like image 951
wswld Avatar asked Oct 27 '25 03:10

wswld


1 Answers

See https://stackoverflow.com/a/7383161/1351347

It is NOT possible to override the system-wide contextMenu. You could (as you already know) push another contextMenu on a longClick on this single EditText.

like image 76
Thkru Avatar answered Oct 30 '25 05:10

Thkru



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!