android弹出键盘时窗口的变化,android – 当软键盘弹出时的页面滚动

我有一个< 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> ,我想我可以滚动页面,以查看第三个输入字段和“确定”按钮被软键盘隐藏,但页面不可滚动。为什么?如何摆脱它?基本上,我想看到每个输入字段和“确定”按钮甚至软键盘弹出。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值