Android的 - 调整屏幕键盘时,弹出? [英] Android - Adjust screen when keyboard pops up?

查看:109
本文介绍了Android的 - 调整屏幕键盘时,弹出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够调整自己的UI屏幕在Android上时软键盘弹出。

I want to be able to adjust my UI screen on Android when the soft keyboard pops up.

所以,在一分钟我有类似的东西下面,我已经和的EditText在屏幕的底部,当用户点击的EditText我想要的一样,在第二张图片会发生什么的第一张照片。

So at the minute I have something similiar to the first picture below where I have and EditText at the bottom of the screen and when a user taps the EditText I want the same as what happens in the second picture.

这就是EditText上被移动了,似乎在软键盘,当软键盘自败它应该然后返回到先前的状态之上坐。

That is that the EditText gets moved up and appears to "sit" on top of the soft keyboard, when the soft keyboard dissapears it should then return to its prior state.

任何人都可以让我知道接近和实现这一目标的最佳方式是什么?

Can anyone let me know the best way to approach and implement this?

推荐答案

您需要添加安卓windowSoftInputMode =adjustResize你在AndroidManifest.xml文件中的标记

You need to add android:windowSoftInputMode="adjustResize" to your tag in the AndroidManifest.xml file.

这篇关于Android的 - 调整屏幕键盘时,弹出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆