24

Every time I open my android app, it automatically focuses the EditText box and the soft keyboard opens up. Is there a way to focus something else on start up so the keyboard doesn't show right away?

Zain
  • 25,701
  • 7
  • 36
  • 61
user1255273
  • 289
  • 1
  • 8

3 Answers3

13

You can try:

android:windowSoftInputMode="stateHidden"

for your activity in AndroidManifest.xml

Vyacheslav Shylkin
  • 9,641
  • 5
  • 37
  • 34
6

Add this two lines to you main layout.

android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
MAC
  • 15,659
  • 8
  • 53
  • 95
3

Add in your layout definition (in xml file) this following options :

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