如何自己控制键盘的显示与隐藏:
<LinearLayout
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"/>
</LinearLayout>
这样还是不能解决一开始就隐藏键盘的功能
首先,找到包含有EditText的那个Activity;
其次,在该Activity被注册的那个AndroidMinifest.xml文件中找到对应的那个Activity标签;
最后,在该Activity标签中加入这个属性值:
android:windowSoftInputMode="stateHidden|adjustResize"