Now that I have delivered my “Mastering the Master-Detail Pattern” presentation three times in the past month or so, it’s about time I actually release some related code.
Hence, I’d like to introduce you to CWAC-MasterDetail.
This library is designed to bundle up a number of recommended Android design patterns into a single reusable implementation. Today, it supports:
- the master-detail UI pattern…
- …with a
ViewPagerfor the detail on screens too small to show both the master and the detail at once…
- …with support for multiple-choice on the master
ListViewand an action mode (a.k.a, contextual action bar) for operations to be performed against the chosen items
Over time, I plan to add support for:
- more options for full screen and immersive modes
- support for the undo bar pattern for destructive operations
- and a variety of other things not directly covered in the Android design guidelines
The library is specifically designed to work as a JAR, not an Android library project, as I am finding that developers often get confused as to how to use an Android library project. That will be dramatically improved as the new build system rolls out and we can standardize on AAR packaging for Android library projects, but in the near term, you can use it as a JAR if desired.
These are very early days for this library, but it should mature fairly nicely over the next couple of months, as I will be using it for some specific projects.
As with the other active CWAC libraries, this one is licensed under the Apache License 2.0, for fairly friendly use in open source and commercial projects.
Stuck on an Android problem? Subscribers have access to live office hours chats with Mark Murphy, to help you work through your challenges!