简体   繁体   中英

ScrollView goes to top when clicking on a text field, how to make it stay?

A short question - how do I make the scroll view actually stay at its position (bottom), when I click on an EditText type of field? Right now whenever I click on it, the scroll view goes straight to the top of screen as if it wanted to appear above the keyboard.

See images for the exact situation.

Normal view:

普通视图

Messed up view, the scroll view goes to top instead of staying at the bottom:

混乱视图,滚动视图转到顶部,而不是停留在底部

   android:windowSoftInputMode="stateHidden|adjustPan"

将此设置为manifest.xml中的活动

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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