不想让软键盘在启动时自动显示

这个问题在这里已经有了答案:

  • 停止EditText在活动启动时获得焦点46个答案

  • 你可以试试:

    android:windowSoftInputMode="stateHidden"
    

    为了您在AndroidManifest.xml中的活动


    将这两行添加到您的主布局。

    android:descendantFocusability="beforeDescendants"
    android:focusableInTouchMode="true"
    

    在你的布局定义(在XML文件中)添加以下选项:

    android:focusable="true" android:focusableInTouchMode="true"
    
    链接地址: http://www.djcxy.com/p/24159.html

    上一篇: Dont want soft keyboard to automatically show on launch

    下一篇: Android: Force EditText to remove focus?