I want to filter my listView using the EditText window and use the adapter function getFilter() . It works fine until I put a space in the text box.
Edit: this is a SimpleAdapter not ArrayAdapter
If my list contains the following words: {"Apple", "Banana", "Red Apple"} If I type "apple", it will return all the items containing the word apple (Apple and Red Apple) in it. If I type "apple", it will not return anything.
Any ideas? Here is the code:
searchBox = (EditText) findViewById(R.id.searchBox); searchBox.addTextChangedListener(filterTextWatcher);
and
private TextWatcher filterTextWatcher = new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) {
source share