pedrovgs/Renderers

Support for LayoutContainer

Aperta

#46 aperta il 13 mag 2018

 (11 commenti) (0 reazioni) (0 assegnatari)Java (174 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (1204 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

As it turns out, Kotlin synthetic properties cache works by default on Activities, Fragments, and Views, but it does not do so for ViewHolder. They fixed this as of Kotlin 1.1.4 via LayoutContainer.

Consumers of this libraries have to make sure they make their Renderers implement LayoutContainer if they are using synthetic properties inside of them. If they do not, their ViewHolders are going to call findViewById() on every call to render() making their ViewHolders obsolete. It would be nice if the library itself did this maybe by adding a Kotlin specific artifact that implements this interface (implementation should be trivial). Thoughts?

Guida contributor