I have created a filter listview where user will enter input via edittext and results are filtered in the listview.
The code is running good but when ever i press Space button, results in the list view disappears. how can i add space in search input without dismissing the listview contents ??
Here is my current code :
myListview.setTextFilterEnabled(true);
edNearBy.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before, int count) {
// TODO Auto-generated method stub
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
}
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
NearByActivity.this.aa.getFilter().filter(s);
}
});
do this way:
but don't do filtering this way, here is the correct one.
I found solution: