使Android中的EditText默认不弹出软键盘

在 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获取焦点后软键盘能正常弹出来

posted on 2015-12-21 14:11  虎牙尼尼  阅读(434)  评论(0编辑  收藏  举报

导航