android - How can I implement filter in Navigation Drawer List Item -


enter image description here

i have long list item on navigation drawer, have added edittext on top of it, implemented filterable on custom adapter, application crashes when add line of code

edittext searchsongs = (edittext)findviewbyid(r.id.searchinput);      if(adapter != null) {         searchsongs.addtextchangedlistener(new textwatcher() {             @override             public void beforetextchanged(charsequence s, int start, int count, int after) {              }              @override             public void ontextchanged(charsequence s, int start, int before, int count) {                 //adapter.getfilter().filter(s);             }              @override             public void aftertextchanged(editable s) {              }         });     } 

if remove code works well, when comment out getfilter method, still crashes.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -