让editView、AutoCompleteTextView开始擒获的焦点
让editView、AutoCompleteTextView开始捕获的焦点
让在我的项目中有一个listView 还有一个AutoCompleteTextView,我不想一运行AutoCompleteTextView就获得焦点
试了一下午没找到方法最终用了一个本办法
<LinearLayout android:focusable="true" android:focusableInTouchMode="true" android:layout_width="0px" android:layout_height="0px"/> <AutoCompleteTextView android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:nextFocusUp="@+id/text" android:nextFocusLeft="@+id/text"/>
如果还不行的话 需要弄一下输入法
android:windowSoftInputMode="stateHidden"
或android:windowSoftInputMode="stateUnchanged" 在<activity> element元素中
这两种方法应该分开都可以的我只是用了第一种