Skip to content

Most visited

Recently visited

navigation
added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:27.0.0

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 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

Fields

public final View view

Public constructors

Presenter.ViewHolder(View view)

Public methods

final Object getFacet(Class<?> facetClass)

Queries optional implemented facet.

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

Sets dynamic implemented facet in addition to basic ViewHolder functions.

Inherited methods

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

Fields

view

added in version 22.1.0
View view

Public constructors

Presenter.ViewHolder

added in version 22.1.0
Presenter.ViewHolder (View view)

Parameters
view View

Public methods

getFacet

added in version 24.1.0
Object getFacet (Class<?> facetClass)

Queries optional implemented facet.

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

added in version 24.1.0
void setFacet (Class<?> facetClass, 
                Object facetImpl)

Sets dynamic implemented facet in addition to basic ViewHolder functions.

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

facetImpl Object: Facet implementation.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)