Android 安卓活动启动时自动聚焦文本视图

Android 安卓活动启动时自动聚焦文本视图,android,focus,android-edittext,Android,Focus,Android Edittext,我有一个活动,它的视图有几个EditText组件 当活动开始时,第一个编辑文本变得集中,键盘出现。我希望避免这种“功能”(我的意思是我希望活动开始后不会有弹出式键盘)创建线性布局(我不知道其他类型的布局是否可行)。设置属性android:focusable=“true”和android:focusableInTouchMode=“true” 尝试添加 android:WindowsOfInputMode=“adjustPan” 添加到清单中的活动元素 对。太好了!非常感谢:) <!--

我有一个活动,它的视图有几个EditText组件

当活动开始时,第一个编辑文本变得集中,键盘出现。我希望避免这种“功能”(我的意思是我希望活动开始后不会有弹出式键盘)

创建线性布局(我不知道其他类型的布局是否可行)。设置属性
android:focusable=“true”
android:focusableInTouchMode=“true”


尝试添加

android:WindowsOfInputMode=“adjustPan”


添加到清单中的活动元素

对。太好了!非常感谢:)
<!-- Dummy item to prevent AutoCompleteTextView from receiving focus -->
<LinearLayout
    android:focusable="true" android:focusableInTouchMode="true"
    android:layout_width="0px" android:layout_height="0px"/>

<!-- :nextFocusUp and :nextFocusLeft have been set to the id of this component
     to prevent the dummy from receiving focus again -->
<AutoCompleteTextView android:id="@+id/text"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:nextFocusUp="@+id/text" android:nextFocusLeft="@+id/text"/>