android 弹出的软键盘遮挡住EditText文本框的解决方案

1.android 弹出的软键盘遮挡住EditText文本框的解决方案:

把Activit对应的布局文件filename.xml文件里的控件用比重设置布局。
(例如:android:layout_weight="31")
并且尽可能把高度设置成自适应的:android:layout_height="wrap_content",
也就是没有设置高度的控件可压缩度的总和,如果比软键盘的高度要大,在
EditText文本输入的时候,弹出的软键盘就不会遮挡住文本输入框。


2.设置默认软键盘隐藏的方法:
在androidManifest.xml工程管理文件里中,对应的activity里设置
android:windowSoftInputMode="adjustUnspecified|stateHidden" 

例如:
<activity android:name="com.Lepad.MyTable" android:windowSoftInputMode="adjustUnspecified|stateHidden" 
                android:screenOrientation="portrait"></activity>

路漫漫其修远兮 吾将上下而求索
原文地址:https://www.cnblogs.com/hudabing/p/3784686.html