开发者

Android long press of menu button

开发者 https://www.devze.com 2023-03-16 05:45 出处:网络
I want to disable long press of menu button in android. I override onkeylongpress because i want the keyboard not to display but unf开发者_运维知识库ortunately, menu button was totally disabled. I wan

I want to disable long press of menu button in android. I override onkeylongpress because i want the keyboard not to display but unf开发者_运维知识库ortunately, menu button was totally disabled. I want to disable the long press of menu button only. How can i do this? Please help!


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?


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........

0

精彩评论

暂无评论...
验证码 换一张
取 消