I’m making an Android application where I have a list of items (over 500 entries), and 10 filter buttons (checkboxes), and a seach box.
The user can click on one or many filters and the list is updated accordingly.
Here is how I did it:
I start by 10 lists, each initialized by only the items matching a filter, then when the user activates (for instance) the filters 1, 3, and 7, I make an intersection of lists 1, 3 and 7 and then I browse it to filter it against the search query.
I found this to be the “fastest” way so far, but I know there is a better and more efficient pattern. What can you recommend so it takes less time?
Thanks
You could use a collection of strategy patterns.