Thursday, June 29, 2017

3.0 Work in Progress 4: MultiSelect, Overflow Menu, and Sort

For those who havent noticed, I am trying to do post progess updates every 2 weeks.  This iteration doesnt have too much to actually show off, however a lot of work was done under the hood.  Everything has been wired for easily adding multi select (and its action menu), the overflow menu, and sort.   By "wired" I mean that the majority of the code was written and for each new view I only have to write a few lines of code to add the capabilities and then write the code to handle the actual selected actions.


This is in the album list view's presenter code (couldnt figure out a way to post code so the formatting is a bit weird).  As you can see its not much code at all to add a lot of functionality

override fun onViewAttached()

    view?.let {        addBehavior(MenuBehavior::class
, ViewModeMenuBehavior(, state))
, GridSizeMenuBehavior(, state))
, SortMenuBehavior(, state))
, AlbumSelectionBehavior())
, AlbumActionModeBehavior(it))

Anyway here are some screenshots