Android AutoCompleteTextView:如何停止下拉列表中的字母排序
若我在AutoCompleteTextView中输入一个单词“wood”,则结果将出现在下拉列表中: “宝莱木” “冬青木” “木头” 我想要这样的结果: “木头” “宝莱木” “冬青木” AutoCompleteTextView进行字母排序。如何停止此排序???您是否尝试过此操作: 在布局XML中,向EditText添加以下属性:Android AutoCompleteTextView:如何停止下拉列表中的字母排序,android,Android,若我在AutoCompleteTextView中输入一个单词“wood”,则结果将出现在下拉列表中: “宝莱木” “冬青木” “木头” 我想要这样的结果: “木头” “宝莱木” “冬青木” AutoCompleteTextView进行字母排序。如何停止此排序???您是否尝试过此操作: 在布局XML中,向EditText添加以下属性: android:inputType="text|textNoSuggestions" 如果这两种方法都不起作用,那么这几乎肯定是emulator和其他设备的问题,
android:inputType="text|textNoSuggestions"
如果这两种方法都不起作用,那么这几乎肯定是emulator和其他设备的问题,您应该直接联系制造商
另请参见:(请注意,EditText是TextView的一个子类,这就是为什么此属性也适用于EditText)。使用android:completionThreshold=“1”
要在输入单个字符('w')时显示选项列表 所以可能的结果是 **“木头” “宝莱木” “冬青木”**
<AutoCompleteTextView
android:id="@+id/autocomplete"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:paddingLeft="10dp"
android:completionThreshold="1"
android:textSize="18sp"
/>