android Programming Glossary: originalitems
How to write a custom filter for ListView with ArrayAdapter http://stackoverflow.com/questions/2519317/how-to-write-a-custom-filter-for-listview-with-arrayadapter listview android arrayadapter share improve this question Actually I noticed that I should have been using 'originalItems' list to build the new filtered one in performFiltering. This will fix any issues that you see regarding changing the text.. ArrayAdapter GlycaemicIndexItem private ArrayList GlycaemicIndexItem items private ArrayList GlycaemicIndexItem originalItems new ArrayList GlycaemicIndexItem private GlycaemicIndexItemFilter filter private final Object mLock new Object public GlycaemicIndexItemAdapter.. items for Iterator iterator items.iterator iterator .hasNext GlycaemicIndexItem gi GlycaemicIndexItem iterator.next originalItems.add gi @Override public int getCount synchronized mLock return items null items.size 0 @Override public GlycaemicIndexItem..
|