我有一個佈局有一些視圖,其中一個是EditText。佈局很容易放在一個頁面上,但是,當軟鍵盤出現時,佈局不會滾動。 這裏是我的佈局的概括:Android:ScrollView不能滾動鍵盤輸出
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background" >
<ScrollView
android:id="@+id/ScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<CheckBox/>
<TextView/>
<LinearLayout>
<EditText>
<requestFocus />
</EditText>
</LinearLayout>
<TextView/>
<LinearLayout>
<Spinner/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<Button
android:layout_alignParentBottom="true" />
</RelativeLayout>
而在我的表現我已經宣佈的屬性:
android:windowSoftInputMode="adjustResize|stateHidden"
有誰知道爲什麼它不工作,如何確保它的工作?
在此先感謝!
對於Android 5,請查看以下相關文章:[Android - 調整鍵盤爲Android 5.0(棒棒糖)時滾動視圖](http://stackoverflow.com/questions/27167176/android-adjust-scrollview-when- keyboard-is-up-for-android-5-0-lollipop) – 2015-11-27 07:49:29