I have a ListView that gets filled by SimpleAdapter, this adapter is local variable inside the procedure that fills the ListView.
Now, I want to filter the ListView, but I have no access to the adapter in the EditText events
is there a way to do that?
I tried MyListView.getAdapter().getFilter().Filter("some text");
Declare adapter as global, setting adapter as global will let you filter it:
Did you try this?, it should works:
Adapter adapter= MyListView.getAdapter(); adapter.getFilter().filter("some text");
Too you can post your code to check what are you doing wrong, if you're using a custom adapter you have to implement the getFilter method