I have a Fragment with an EditText, when I click on it the soft keyboard shows up which is OK.. Now I want to keep this keyboard visible no matter what until I press the Back button. Currently, whenever I click outside the EditText the keyboard hides immediately, I don't want that.
My Fragment XML:
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/conversation_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/myList"
android:layout_width="0dp"
android:layout_height="0dp"
android:divider="@null"
android:paddingBottom="2dp"
android:transcriptMode="alwaysScroll"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"
tools:layout_editor_absoluteX="0dp" />
<LinearLayout
android:id="@+id/controlsLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteX="0dp">
.....
<EditText
android:id="@+id/messageInput"
android:layout_width="0dp"
android:layout_height="44dp"
android:inputType="textAutoComplete|textMultiLine"
android:paddingEnd="1dp"
android:paddingStart="3dp"
android:textColor="@android:color/black" />
.....
</LinearLayout>
Note: I don't want to intercept Back button. I want to keep the Soft Input Keyboard visible even if I click out side the EditText, That's all.