AAverin
AAverin

Reputation: 3042

Disable keypad or whole keyboard support on android activity?

I have a layout with lots of different imagebuttons on it.
Application is developed in full-touch, so there should be no response to keyboard or keypad on all activities except one, where user can input his name.
Is there a way to achieve that?

I've checked on debug, keypress and keypad press result in onKeyDown event.
I've set it to return 'false' for all keys.
But, for some reason, android keeps selecting my imagebuttons when keypad is pressed.
And pressing Enter key result in View.onClick event.

How to totally disable all keyboard input for activity?
I use Motorola Milestone for tests - a slider with a keyboard
Thanks

Upvotes: 1

Views: 1430

Answers (1)

Rohith Nandakumar
Rohith Nandakumar

Reputation: 11427

Try using the android:windowSoftInputMode="stateAlwaysHidden" for the tag in the Manifest.xml file.

http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft

Upvotes: 1

Related Questions