Softkeyboard blocking EditText

2019-06-04 08:39发布

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?

2条回答
我只想做你的唯一
2楼-- · 2019-06-04 09:04

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.

查看更多
Ridiculous、
3楼-- · 2019-06-04 09:08

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

查看更多
登录 后发表回答