android soft keyboard verwöhnt das layout wenn erscheint
Hier ist ein Layout:
<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>
Ich möchte, dass der blaue Balken intakt bleibt, wenn EditText berührt wird und die Bildschirmtastatur angezeigt wird. Das heißt Ich möchte, dass seine Größe und Position erhalten bleiben. Ich habe alle vier möglichen Werte für den Parameter meiner Aktivität ausprobiertandroid:windowSoftInputMode
im AndroidManifest. Und immer verschiebt oder verkleinert sich mein blauer Balken auf der erscheinenden Tastatur:
android:windowSoftInputMode="adjustUnspecified"
oder standardmäßig:
android:windowSoftInputMode="adjustPan"
oderandroid:windowSoftInputMode="adjustNothing"
:
android:windowSoftInputMode="adjustResize"
:
Ist es jemals möglich, dieselbe Größe und Position beizubehalten, wenn die Softtaste angezeigt wird?