Presenter.ViewHolder


class Presenter.ViewHolder : FacetProvider


ViewHolder can be subclassed and used to cache any view accessors needed to improve binding performance (for example, results of findViewById) without needing to subclass a View.

Summary

Public constructors

ViewHolder(view: View!)

Public functions

Any!
getFacet(facetClass: Class<Any!>!)

Queries optional implemented facet.

Unit
setFacet(facetClass: Class<Any!>!, facetImpl: Any!)

Sets dynamic implemented facet in addition to basic ViewHolder functions.

Public properties

View!

Public constructors

ViewHolder

Added in 1.1.0
ViewHolder(view: View!)

Public functions

getFacet

Added in 1.2.0-alpha04
fun getFacet(facetClass: Class<Any!>!): Any!

Queries optional implemented facet.

Parameters
facetClass: Class<Any!>!

Facet classes to query, examples are: class of ItemAlignmentFacet.

Returns
Any!

Facet implementation for the facetClass or null if feature not implemented.

setFacet

Added in 1.1.0
fun setFacet(facetClass: Class<Any!>!, facetImpl: Any!): Unit

Sets dynamic implemented facet in addition to basic ViewHolder functions.

Parameters
facetClass: Class<Any!>!

Facet classes to query, can be class of ItemAlignmentFacet.

facetImpl: Any!

Facet implementation.

Public properties

view

Added in 1.1.0
val viewView!