Most visited

Recently visited

Presenter.ViewHolder

public static class Presenter.ViewHolder
extends Object implements FacetProvider

java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter.ViewHolder
Known Direct Subclasses
Known Indirect Subclasses


ViewHolder可以被子类化并用于缓存任何需要提高绑定性能的视图访问器(例如,findViewById的结果),而不需要继承View的子类。

Summary

Fields

public final View view

Public constructors

Presenter.ViewHolder(View view)

Public methods

final Object getFacet(Class<?> facetClass)

查询可选的已实施构面。

final void setFacet(Class<?> facetClass, Object facetImpl)

除了基本的ViewHolder函数之外,还设置动态实现的构面。

Inherited methods

From class java.lang.Object
From interface android.support.v17.leanback.widget.FacetProvider

Fields

view

View view

Public constructors

Presenter.ViewHolder

Presenter.ViewHolder (View view)

Parameters
view View

Public methods

getFacet

Object getFacet (Class<?> facetClass)

查询可选的已实施构面。

Parameters
facetClass Class: Facet classes to query, examples are: class of ItemAlignmentFacet.
Returns
Object Facet implementation for the facetClass or null if feature not implemented.

setFacet

void setFacet (Class<?> facetClass, 
                Object facetImpl)

除了基本的ViewHolder函数之外,还设置动态实现的构面。

Parameters
facetClass Class: Facet classes to query, can be class of ItemAlignmentFacet.
facetImpl Object: Facet implementation.

Hooray!