Im using one edittext and listview in my app.
i need to display the list according to the text in edittext.
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
// TODO Auto-generated method stub
adapter.getFilter().filter(s.toString());
}
eg
if i type the value as “an” means it display like
Andorra
Angola
Antigua
But i need like this
Andorra
Angola
Antigua
Bangladesh
Bhutan
Canada
Thanks in advance
Here is the example exactly which you are looking for. check this
Here is the simple logic with
`ArraysandaddTextChangedListenerforEditTextIn Change the block of code as like this.
I have replace
equalsIgnorecasewithcontains. Please check the difference here