私はそれをクリックすると、ソフトキーボードが表示されているOKをクリックすると、EditTextを持つフラグメントがあります。 今、私はバックを押すまで何時でもこのキーボードを見えるようにしたいボタン。 現在、EditTextの外側をクリックするたびにキーボードがすぐに隠れるので、私はそれを望んでいません。戻るボタンでソフトキーボードを隠す
マイ・フラグメント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>
注:私はボタンを戻るインターセプトする必要はありません。 EditTextをクリックしてもソフト入力キーボードが見えるようにしたい、それだけです。バックボタンが押されたときは、キーボードを非表示にするこれを使用することができます
[ソフトキーボードの戻るボタンをインターセプトする](https://stackoverflow.com/questions/3940127/intercept-back-button-from-soft-keyboard) – Ibrahim