Ecco un layout:Android morbido layout di tastiera bottino quando appare
<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>
voglio barra blu di rimanere intatto quando EditText viene toccato e appare tastiera virtuale. Cioè Voglio che le sue dimensioni e la sua posizione siano preservate. Ho provato tutti e quattro i possibili valori per il parametro android:windowSoftInputMode
della mia attività in AndroidManifest. E sempre il mio bar si muove blu o si restringe sulla tastiera virtuale che appare:
android:windowSoftInputMode="adjustUnspecified"
o per difetto:
android:windowSoftInputMode="adjustPan"
o android:windowSoftInputMode="adjustNothing"
:
android:windowSoftInputMode="adjustResize"
:
E 'mai possibile mantenere la stessa dimensione e posizione quando viene visualizzato il tasto software?
ho provato con 'adjustNothing' e sembra funzionare sul mio dispositivo (Google Nexus) – fiddler