android - How can I implement filter in Navigation Drawer List Item -
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
Post a Comment