[英]How to move the input layout go up when the keyboard appears
I'm sorry if any similar question has been resolved in other topics. 对于其他主题是否解决了任何类似的问题,我们深感抱歉。 I have a screen with the root is a frame layout.
我的屏幕根部是框架布局。
What I expected is when the keyboard appears, the layout contains content is keep unchanged while the layout contains edit text move up to the keyboard. 我期望的是,当键盘出现时,包含内容的布局保持不变,而包含编辑文本的布局向上移动到键盘。
Please check the images below 请检查下面的图片
Is there any solution to achieve this? 有什么解决方案可以做到这一点吗?
Thanks a lot for your help. 非常感谢你的帮助。
Basically what you need is to edit the activity tag in your AndroidManifest.xml
: 基本上,您需要在
AndroidManifest.xml
编辑activity标签:
<!-- Configures the keyboard to be hidden right away and for UI to keep content as is when shown -->
<activity
android:name="com.example.myactivity"
android:windowSoftInputMode="stateHidden|adjustPan" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.