В одном фрагменте я использовать этот макетAndroid клавиатура перекрывает EditText
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/header_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" >
<LinearLayout
android:id="@+id/layoutButtonAdd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
<ImageView style="@style/line" />
<Button
android:id="@+id/buttonAdd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/addSrButton"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:id="@+id/layoutList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/layoutButtonAdd"
android:layout_alignParentTop="true"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/progressContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone" >
<ProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dip"
android:singleLine="true"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:id="@+id/listContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="1dip"
android:paddingLeft="9dip"
android:paddingRight="4dip"
android:paddingTop="1dip" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="beforeDescendants"
android:drawSelectorOnTop="false"
android:visibility="gone" />
<TextView
android:id="@+id/internalEmpty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</LinearLayout>
К android:id="@android:id/list"
я динамически добавлять нужный вид (редактировать текст, например).
Проблема в том, что если я впервые нажимаю на EditText, он принимает фокус и окно правильно настраивает панорамирование. Но если я нажму на editText, у которого уже есть фокус, появляется клавиатура, но она перекрывает необходимое поле EditText (т. Е. Настройка панорамирования работает неправильно). В моем файле манифеста android:windowSoftInputMode="adjustPan"
установлен. android:minSdkVersion="7"
I'v прочитать о трюке с оберточным макетом с ScrollView
, но у меня уже есть элемент с вертикальной прокруткой (LinearLayout).
Любые идеи?
Это не решение для меня «потому что у меня есть некоторые соображения в нижней части этого EditText (кнопка в нижней части макета, по крайней мере) –
ой вы можете CHK эта ссылка http://www.vogella.com/blog/2010/10/25/android-windowsoftinputmode/ – Rupali