Please am trying to implement a filter on my listview. But whenever the text change, the list disappears.Please Help Here are my codes. The adapter class.
p
One thing I've noticed is that whenever you are editing the list (adding items for example) as well as filtering for it, then inside the @Override getView
method, you shouldn't use filteredData.get(position)
, as it throws an IndexOutOfBounds
exception.
Instead, what worked for me, was using the getItem(position)
method, which belongs to the ArrayAdapter
class.