Learning, discovering, and implementing data binding in PhotoPress today.
It’s new, refreshing, slightly intriguing*, and almost delightful.
*Like everything Android, it has some less-documented bits. Two examples:
- The binding adapter methods have to be
@JvmStatic
, just plain old Kotlin companion object static won’t do. - The methods and variables used have to be Public. Private won’t work (obviously), while internal may work, but will show up as
viewmodel.publishThat$debug()
instead of justviewmodel.publishThat()
.