简体   繁体   中英

Show edittext when soft keyboard appear in android

I have some edittext on my layout, when I click on the edittext for filling it the softkeyboard appear and everything in fine, I can see the input and the softkeyboard but when I click on the edittexts at the bottom of the layout the softkeyboard appear and the edittext is not visible while I'm typing, I have to scroll down to see it. Is there any way to automatically scroll to the edittext so I can see when I'm typing and the softkeyboard at the same time?

您只需将其添加到清单中的活动标签中

android:windowSoftInputMode="adjustPan"

Have a look at this developers blog _ On-screen Input Methods .

Summing up I guess this line should help you:

android:windowSoftInputMode="stateVisible|adjustResize">

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