dansondergaard/Unibeer — pull request #27 by dansondergaard (2012-07-03 22:58:37+00:00)
Title: Better filtering and separation of tasted beers into own activity

Don't merge yet, but please review and comment.

This pull request consists is a simplification of the filtering code and a refactoring of UnibeerActivity. To address issue #6 I've moved a lot of generic code from UnibeerActivity into a new BeerListActivity.

The only assumption that a BeerListActivity makes is the presence of a list of beers. It doesn't care about how the list is retrieved or made. It simply presents it and allows filtering.

UnibeerActivity inherits from BeerListActivity to gain this functionality. In addition, it provides the menu (just as before) and takes care of updating the data file using UpdateManager (just like before). When a list of beers is ready, it's given to BeerListActivity which then renders the list.

An activity for showing tasted beers can then be implemented by inheriting from BeerListActivity. UnibeerActivity will build a list of tasted beers from its own updated list and hand it to the tasted beers activity. This is the next thing I'll begin working on :-)