Skye
Skye

Reputation: 300

Stop showing softkeyboard in WebView

Is there a way to prevent the softkeyboard to show up in a WebView? My app is attached to a scanner which simulates keyboard entry (that works so far), so the softkeyboard is only annoying when it occupies the screen. The Nullkeyboard from the Playstore does the trick, but in certain cases I would like to enable the keyboard again.

If it helps, I can control the content of the webpage being shown. Would like to avoid programming a full input method.

Upvotes: 1

Views: 133

Answers (1)

invertigo
invertigo

Reputation: 6438

In your manifest, on the activity, use android:windowSoftInputMode="stateAlwaysHidden" and the soft keyboard should never be displayed.

Upvotes: 1

Related Questions