问题描述
软输入模式是SOFT_INPUT_ADJUST_PAN
,当显示键盘时, EditText
向上移动以保持可见,但键盘和txt的底部总是粘在一起,如截图所示,我想在它们之间留一些空间,是否可能?
Soft input mode is "SOFT_INPUT_ADJUST_PAN"
, and when keyboard shown, EditText
moves up to stay visible, but the keyboard and txt's bottom are always sticked together as seen on screenshot, I want some space between them, is it possible?
此外输入模式必须保持为SOFT_INPUT_ADJUST_PAN
。
Also input mode must stay as "SOFT_INPUT_ADJUST_PAN"
.
对不起我的英文,在此先感谢...
Sorry form my english, Thanks in Advance...
推荐答案
你为什么不尝试这个?
android:windowSoftInputMode="adjustResize"
我知道你想调整平底锅,但这也可以解决你的问题。
I know you want to adjust pan but this would solve your problem aswell.
由于你真的想继续使用adjustPan,也许你可以尝试重新设计一下XML布局。
Since you really want to stay with adjustPan, maybe you can try re-designing the XML layout a little bit.
你还必须添加你需要的填充到布局文件中最外层的容器元素。
You must also add your required padding to the outer most container element in the layout file.
这篇关于Android中键盘和EditText之间的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!