3

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.

Community
  • 1
  • 1
wswld
  • 1,218
  • 15
  • 32

1 Answers1

3

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.

Community
  • 1
  • 1
Thkru
  • 4,218
  • 2
  • 18
  • 37
  • 1
    I asked that question, you beat me by a few seconds here =p – FoamyGuy Jun 07 '12 at 13:26
  • 2
    Problem is, I don't need to change it systemwide. I need to change only one menu in my app. Example you linked is again concerning the systemwide/inter-app alterations. – wswld Jun 07 '12 at 13:34
  • But I got the idea, that even in your own app you need to override the menu with your own and add all of the default options manually, right? – wswld Jun 07 '12 at 13:42