这是我AutoCompleteTextView代码:定做自动完成文本搜索建议列表
String[] countries = getResources().getStringArray(R.array.countries_array);
final ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,R.layout.item_list ,countries);
textView = (AutoCompleteTextView) dialog.findViewById(R.id.autoCompleteTextView1);
adapter.setNotifyOnChange(true);
textView.setAdapter(adapter);
这是item_list:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:textSize="16sp"
android:textColor="#000"
android:drawableRight="@drawable/arrow">
,这是输出:
我想改变这个弹出式的建议框,并且想要在AutoCompleteTextView下面显示一些建议列表。(类似于这个):(请忽略苹果设计,它只是关于结果出现的位置)
我怎样才能做到这一点..Please建议。 谢谢。
你能帮我这个吗?http://stackoverflow.com/questions/29046302/how-to-implement-autocompletetextview-with-listview – 2015-03-16 09:55:45