让editView、AutoCompleteTextView开始捕获的焦点
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |
让在我的项目中有一个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元素中
这两种方法应该分开都可以的我只是用了第一种
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |