开发者

How to move my edittext up when stkeyboard is on

I have cre开发者_如何学Cated a login page. If I insert some text in edit text (username, password) etc then a softkeyboard is visible. but it comes on my password field view. So upper half of password field is visible while lower half is not because of that softkeyboard. I want when the softkeyboard is visible the password field to move up a little, so that the entire edittext will be visible.

Thanks


add this line in your menifest.xml file

<activity android:name=".your_activity" android:windowSoftInputMode="adjustResize"></activity>


Your layout should shift up automatically when it has focus and the softkeyboard is displaying. I have a login form and I've done nothing special to get this behaviour.


One way you can solve this is by having a ScrollView as the root of your layout.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜