简体   繁体   English

showSoftwareKeyboard取消全屏设置并更改布局

[英]showSoftwareKeyboard unsets fullscreen and alters the layout

When I click a TextInput field, the software keyboard shows up, but it seems like it tries to compress the entire layout in the remaining space above the keyboard. 当我单击TextInput字段时,将显示软件键盘,但似乎它试图在键盘上方的剩余空间中压缩整个布局。 All elements with relative size ends up smaller. 所有具有相对大小的元素最终都会变小。 Are there any general guidelines for solving this problem? 是否有解决此问题的一般准则?

To fix it you should use LinearLayout . 要修复它,您应该使用LinearLayout Because Relative depends of other elements. 因为相对取决于其他元素。

您需要在应用程序标签内的AndroidManifest.xml文件中添加android:windowSoftInputMode =“ adjustPan”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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