Softkeyboard blocking EditText

杀马特。学长 韩版系。学妹 提交于 2020-01-03 00:40:06

问题


I'm having the following problem:

I have an activity which enables a user to post comments on some article. When the user taps the EditText field where the comment can be posted, the softkeyboard ends up blocking the text field such that the user can't see what is being typed. How can I make sure that the EditText field is always, at least partly, visible?


回答1:


Add the contents of your activity to a scrollable layout and when the EditText view gets focus manually scroll the ScrollView.




回答2:


Make your layout scrollable by using scrollview so that the Edittext will scroll to up and placed above the softkeyboard and you can view the EditText.



来源:https://stackoverflow.com/questions/6411267/softkeyboard-blocking-edittext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!