我有一个< ScrollView>布局:
android:id="@+id/my_scrollview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:id="@+id/input_one"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:inputType="number" >
android:id="@+id/input_two"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:inputType="number" >
android:id="@+id/input_three"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:inputType="number" >
android:id="@+id/ok_btn"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:text="@string/ok_str" />
如上所示,简单的布局由三个输入字段和一个“确定”按钮组成。
我使用上面的布局运行我的应用程序,当我点击第一个输入字段(@ id / input_one),软键盘将从屏幕底部弹出,它隐藏第三个输入字段和“确定”按钮。
因为我使用< ScrollView> ,我想我可以滚动页面,以查看第三个输入字段和“确定”按钮被软键盘隐藏,但页面不可滚动。为什么?如何摆脱它?基本上,我想看到每个输入字段和“确定”按钮甚至软键盘弹出。