したがって、コードの次の部分を使用して入力を取得していますが、キーボードが表示されるとすぐに、このgifのようにテキストがヒントの下に非表示になります。これを防ぐにはどうすればよいですか。
<LinearLayout
android:layout_width="330dp"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="0.1"
android:orientation="horizontal">
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.8">
<EditText
style="@style/Widget.AppCompat.AutoCompleteTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginRight="10dp"
android:hint="Enter message here..." />
</android.support.design.widget.TextInputLayout>
あなたのマニフェストでそれを問題を引き起こしている活動に入れてください
android:windowSoftInputMode="adjustPan"
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加