如何在保留活动中滚动功能的同时显示键盘?
我有一个基本上是一种形式的活动。当用户选择编辑文本时,活动要么遮盖表单的一部分(包括提交按钮),要么尝试重新调整,但这不起作用,因为唯一的可滚动区域是表单本身 - 其他所有内容都与权重紧密相关。我已使用“android:windowSoftInputMode”尝试将其调整为调整大小或平移,但由于上述结果,两者都不起作用。
我正在寻找的是键盘是否显示以及活动是否隐藏 - 用户仍然可以在活动中上下滚动以在键盘显示时查看表单的其他部分。这可能吗?
提前致谢。
I have an activity which is basically a form. When the user selects an edittext, the activity either obscures part of the form (including the submit button) or tries to readjust which doesnt work because the only scrollable area is the form itself - everything else is pretty tightly bound with weights. I have used "android:windowSoftInputMode" to try and adjust it to either resize or panning but both don't work due to the outcome above.
What I am looking for is that the keyboard is shown and whether the activity is hidden or not - the user can still scroll up and down in the activity to see other parts of the form while the keyboard is showing. Is this possible?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这应该是可能的,我有一项活动与你似乎正在尝试的事情做同样的事情。我所拥有的只是一个带有一堆子布局和小部件的 ScrollView 。每当键盘出现时,我都没有问题。
我在abstractWorkOrderParentlayout中至少有20多个垂直对齐的小部件,并且滚动效果正如我认为你想要的那样
ya that should be possible, i have an activity that does the same thing as what you seem to be trying. all i have is a ScrollView with a bunch of children layouts and widgets. and any time the keyboard comes up, i dont have a problem.
i have at least 20 more widgets aligned vertically in abstractWorkOrderParentlayout and the scrolling works as i think you want it to