方法一
在mainfest文件设置activity属性
android:windowSoftInputMode="stateHidden"
方法二
在布局文件中使焦点在其他控件上
<TextView
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="wrap_content"
android:layout_height="0dp">
<requestFocus/>
</TextView>
在mainfest文件设置activity属性
android:windowSoftInputMode="stateHidden"
方法二
在布局文件中使焦点在其他控件上
<TextView
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="wrap_content"
android:layout_height="0dp">
<requestFocus/>
</TextView>