简体   繁体   English

键盘隐藏了edittext,并且没有滚动ANDROID

[英]Keyboard hidden edittext and there isn't scroll ANDROID

I done a form with 5 edittexts but when the keyboard is going to show the last two edittext I can't see. 我用5个edittexts完成了一个表单,但是当键盘要显示最后两个edittext时,我看不到。

Only way to switch to the next fields is to use the buttons on the keyboard. 切换到下一个字段的唯一方法是使用键盘上的按钮。

There is any solution to add a scroll without use the buttons? 有什么解决方案可以在不使用按钮的情况下添加滚动条?

I tried with sdk 3, resize keyboard and other things like that. 我尝试使用sdk 3,调整键盘大小以及其他类似方法。

Why not keep the entire layout in a scrollview. 为什么不将整个布局保留在滚动视图中。 And add the attribute to the activity in manifest file 并将属性添加到清单文件中的活动

<activity android:windowSoftInputMode="stateVisible|adjustResize">

So when the keyboard is shown, the layout will be scrollable. 因此,当显示键盘时,布局将是可滚动的。

http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft

Have you tried adding the android:windowSoftInputMode tag to your activity in the manifest? 您是否尝试过将android:windowSoftInputMode标记添加到清单中的活动中? From what you are describing I would think that either adjustResize or adjustPan should work. 根据您的描述,我认为adjustResize或adjustPan应该起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM