Reputation: 47
I have a ListView that populates with items from ArrayList<myClass>
. I have a layout and custom adapter and they show up just fine. myClass
has two textview
s in. I am wondering how I can filter out results by checking if what a user types in the edittext matches either of the textview
s in the myClass
class. I tried this solution, but it failed because I am using classes to fill my listview
, not strings. Help is greatly appreciated.
Upvotes: 0
Views: 56
Reputation: 3229
Take a look at the documentation for SearchView. It's got some useful capabilities. All you need to do is add on a OnQueryTextListener and you'll be well on your way to manipulating a ListView.
Upvotes: 1