I want to show the suggestion list that contains only those words that begins with input character not those word that contains the input character.
For example suppose I typed L
than it will show me list like
["Launga Beach","Launga Hills","Launga Woods"]
not like this
["Echo Lake,"Fields Landing","Green Vally Lake"]
here is my code
ArrayAdapter<String> cityAdapter = new ArrayAdapter<String>(getActivity(),R.layout.auto_complete_select_dialog_item,mCityZipCodeMasterForCity.getCity());
cityAutoCompleteTextView.setThreshold(1);
cityAutoCompleteTextView.setAdapter(cityAdapter);
cityAutoCompleteTextView.setOnFocusChangeListener(new AutoCompleteTextValidator());
Is there anyway to achieve this in autocomplete textview in android?
Thanks!
Below I have added sample
Adapter
for your reference withCustom
filter.You just need your filtration logic.
CustomAdapter.java
Thanks.