pedrovgs/Renderers

Support for LayoutContainer

Open

#46 opened on May 13, 2018

View on GitHub
 (11 comments) (0 reactions) (0 assignees)Java (1,204 stars) (174 forks)batch import
enhancementhelp wanted

Description

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?

Contributor guide