Đây là mã cho AutoCompleteTextView tôi:tùy chỉnh các Đề xuất Danh sách AutoComplete Lưu
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);
Đây là 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">
và đây là kết quả:
Tôi muốn thay đổi loại hộp gợi ý bật lên này, và muốn hiển thị danh sách gợi ý một chút bên dưới từ AutoCompleteTextView ..similar về điều này: (hãy bỏ qua thiết kế của quả táo, nó chỉ là nơi kết quả xuất hiện)
Làm cách nào tôi có thể làm điều này ..Xin vui lòng đề xuất. Cảm ơn. !!
bạn có thể giúp tôi với http://stackoverflow.com/questions/29046302/how-to-implement-autocompletetextview-with-listview –