square/android-times-square — pull request #42 by tadfisher (2013-05-14 19:20:19+00:00)
Title: Allow fine-grained style overriding by client applications

Ran into a problem when styling the calendar: I needed a different text color for other-month dates and unselectable dates, but it was hardcoded in `MonthView`. I also found it really confusing to mentally map `state_enabled` to `!isCurrentMonth` and `state_checked` to `!isToday`.

This change replaces the use of `CheckedTextView` with custom `TextView` subclass that manages some more aptly-named cell states. Client applications can now set different styles based on any combination of these states, the state semantics are a lot easier to remember, we aren't hardcoding styles, and it will be much easier to add additional states in the future.