views:

224

answers:

2

Subject says it all. I have seen examples implementing a custom Filter. The Android developer docs talk about implementing a Filterable interface. Does anyone have any advice and/or sample code on the best way to implement filtering in a ListView ?

+1  A: 

This video comes from the latest Google I/O (2010), it's called "The world of ListView".

http://code.google.com/intl/it-IT/events/io/2010/sessions/world-of-listview-android.html

at 34:25 it explains how to implement a text filter

here, at line398, an example of use:

http://www.google.com/codesearch/p?hl=it#uX1GffpyOZk/core/java/android/widget/ArrayAdapter.java&q=android%20arrayadapter&sa=N&cd=1&ct=rc

enjoy :)

Qlimax
A: 

I looked at some sample code from other developers and learned a lot by simply reading through the source for ArrayAdapter. Armed with that info I managed to implement my own filtering.

Eno