Android listview edittext filter space button?

后端 未结 2 1667
误落风尘
误落风尘 2020-12-21 18:43

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 Sp

2条回答
  •  佛祖请我去吃肉
    2020-12-21 19:14

    do this way:

    public void afterTextChanged(Editable s) {
        String st = s.toString().trim();            
        NearByActivity.this.aa.getFilter().filter(st);
    }
    

    but don't do filtering this way, here is the correct one.

提交回复
热议问题