1.方法一:在配置文件中设置
android:windowSoftInputMode="stateHidden"
2.方法二: 在一xml布局中添加一个LinearLayout
<LinearLayout
android:layout_width="0px"
android:layout_height="0px"
android:focusable="true"
android:focusableInTouchMode="true" />
关于focusableInTouchMode和 focusable 属性可以参考 android:focusable和android:focusableInTouchMode的区别