Search code examples
androidkeyboardloadhideandroid-edittext

Hide soft keyboard on application load


I have an application with an EditText element on the main view. This means that when my application is loaded the soft keyboard appears per default.

I would like to be able to hide the keyboard on load, so it does not show until i tap on the EditText view.

How do i manage this?


Solution

  • You can do something easier. Add this to the LinearLayout (or any other layout that is the root):

    <LinearLayout
    ...
    android:focusable="true"
    android:focusableInTouchMode="true"
    ...
    />