开发者

Softkeyboard blocking EditText

开发者 https://www.devze.com 2023-03-14 07:21 出处:网络
I\'m having the following problem: I have an activity which enables a user 开发者_JAVA百科to post comments on some article. When the user taps the EditText field where the comment can be posted, the

I'm having the following problem:

I have an activity which enables a user 开发者_JAVA百科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?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消