レイアウトは次のとおりです。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1" />
<FrameLayout
android:background="#0000ff"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1" />
</LinearLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
EditText がタッチされ、ソフト キーボードが表示されたときに、青いバーがそのまま残るようにします。つまり、そのサイズと位置を保持したいのです。android:windowSoftInputMode
AndroidManifest で、アクティビティのパラメーターの 4 つの可能な値すべてを試しました。そして、ソフトキーボードが表示されると、常に青いバーが移動または縮小します。
android:windowSoftInputMode="adjustUnspecified"
またはデフォルトで:
android:windowSoftInputMode="adjustPan"
またはandroid:windowSoftInputMode="adjustNothing"
:
android:windowSoftInputMode="adjustResize"
:
ソフト キー b が表示されたときに、同じサイズと位置を維持することはできますか?