0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="4" >
<EditText
android:id="@+id/select_part"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.2"
android:ems="18"
android:textSize="15sp" >
<requestFocus />
</EditText>
<ListView
android:id="@+id/part_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3.6" />
<LinearLayout
android:id="@+id/back_buttons"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.2"
android:orientation="horizontal" >
<Button
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Move to Purchase Order" />
<Button
android:id="@+id/back2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Move to Invoice info" />
</LinearLayout>
</LinearLayout>
在這裏,我用上面的佈局來顯示列表視圖和TextView
和Button
。但當軟鍵盤出現在關鍵局取得small.In的大小爲了防止我使用了activty防止佈局的大小時,軟鍵盤顯示
android:windowSoftInputMode="adjustResize"
但是這給我什麼
嘗試將其更改爲android:windowSoftInputMode =「adjustPan」。更多鏈接http://developer.android.com/guide/topics/manifest/activity-element.html – busylee
在'manifest'中使用'android:windowSoftInputMode =「adjustResize | adjustPan」'。 – kId