我有一个布局有一些视图,其中一个是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