GeekedOut
GeekedOut

Reputation: 17185

Is there a way to make the keyboard not to pop up as a default in a particular screen?

I have an Activity screen with a form that has a text area, and text below the form. When the screen opens, for some reason, the keyboard pops up automatically and blocks the bottom part of the screen for the user, causing some confusion since they don't get to see the text that is below.

Is there a way to not make the keyboard pop up by default and only have it pop up when the user clicks inside the text area?

Thanks!

Upvotes: 0

Views: 97

Answers (2)

Dimitar Dimitrov
Dimitar Dimitrov

Reputation: 564

Use this attributes on the textarea in your xml file

android:focusable="true"
android:focusableInTouchMode="true"

Upvotes: 1

Mohsin Naeem
Mohsin Naeem

Reputation: 12642

In your manifest file use this

 <activity
        android:name=".YourActivityName"
        android:configChanges="keyboardHidden|orientation"
        android:windowSoftInputMode="stateHidden" />

Upvotes: 2

Related Questions