1

I want to disable long press of menu button in android. I override onkeylongpress because i want the keyboard not to display but unfortunately, menu button was totally disabled. I want to disable the long press of menu button only. How can i do this? Please help!

Dudu
  • 39
  • 1
  • 9

2 Answers2

3

Please don't do that. In my device (Samsung Galaxy S2) you long pressing menu is like pressing search (the device doesn't have a dedicated search button). What I mean is that this is not a default for all android devices, if you change that you may break your app in some devices.

If you really want to do that though, you might want to watch for when the soft keyboard is shown/hidden. Here: How to check visibility of software keyboard in Android?

Community
  • 1
  • 1
renam.antunes
  • 771
  • 1
  • 5
  • 11
0

if you want to play with screen keyboard here are some options.........

android:windowSoftInputMode=["stateUnspecifie",  "stateUnchanged", "stateHidden" "stateAlwaysHidden", "stateVisible", "stateAlwaysVisible", "adjustUnspecified", "adjustResize", "adjustPan"]  ......    

declare it in manifest's activity........

Dan J
  • 24,430
  • 17
  • 95
  • 168
patric_cena
  • 1,866
  • 1
  • 12
  • 17