I've DialogFragment and three TextInputLayouts. When I click on the first TextInputLayout then the keyboard opens. And it does not disappear when you click on others TextInputLayout.
getDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
or
android:windowSoftInputMode="stateHidden"
don't work.
How to solve a problem?
My .xml code
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputLayout
android:id="@+id/tilDialogTaskTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/tilDialogTaskDate"
android:layout_width="130dp"
android:layout_below="@+id/tilDialogTaskTitle"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:inputType="none"
android:focusableInTouchMode="false"
android:cursorVisible="false"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/tilDialogTaskTime"
android:layout_width="130dp"
android:layout_alignRight="@+id/tilDialogTaskTitle"
android:layout_below="@+id/tilDialogTaskTitle"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:inputType="none"
android:focusableInTouchMode="false"
android:cursorVisible="false"/>
</android.support.design.widget.TextInputLayout>
<Spinner
android:id="@+id/spDialogTaskPriority"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tilDialogTaskDate"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="10dp"
/>
</RelativeLayout>
</ScrollView>