在 AndroidMainfest.xml中选择EditText 所在的activity,设置windowSoftInputMode属性为 adjustUnspecified|stateHidden
<activity
android:name=".nxcattiiyun.LoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustUnspecified|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.zftlive.android.SAMPLE_CODE" />
</intent-filter>
</activity>
EditText 中依旧是
android:focusable="true"
android:focusableInTouchMode="true"
来保证点击EditText获取焦点后软键盘能正常弹出来