Most visited

Recently visited

AbstractDetailsDescriptionPresenter

public abstract class AbstractDetailsDescriptionPresenter
extends Presenter

java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter
     ↳ android.support.v17.leanback.widget.AbstractDetailsDescriptionPresenter


用于呈现项目的详细描述的摘要Presenter 通常,此演示者将用于DetailsOverviewRowPresenterPlaybackControlsRowPresenter

子类必须覆盖 onBindDescription(AbstractDetailsDescriptionPresenter.ViewHolder, Object)才能实现此Presenter的数据绑定。

Summary

Nested classes

class AbstractDetailsDescriptionPresenter.ViewHolder

ViewHolder为AbstractDetailsDescriptionPresenter

Public constructors

AbstractDetailsDescriptionPresenter()

Public methods

final void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item)

View绑定到一个项目。

final AbstractDetailsDescriptionPresenter.ViewHolder onCreateViewHolder(ViewGroup parent)

创建一个新的 View

void onUnbindViewHolder(Presenter.ViewHolder viewHolder)

从项目中 View绑定 View

void onViewAttachedToWindow(Presenter.ViewHolder holder)

当此演示者创建的视图已附加到窗口时调用。

void onViewDetachedFromWindow(Presenter.ViewHolder holder)

当此演示者创建的视图已从窗口分离时调用。

Protected methods

abstract void onBindDescription(AbstractDetailsDescriptionPresenter.ViewHolder vh, Object item)

将项目中的数据绑定到ViewHolder。

Inherited methods

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

Public constructors

AbstractDetailsDescriptionPresenter

AbstractDetailsDescriptionPresenter ()

Public methods

onBindViewHolder

void onBindViewHolder (Presenter.ViewHolder viewHolder, 
                Object item)

View绑定到一个项目。

Parameters
viewHolder Presenter.ViewHolder
item Object

onCreateViewHolder

AbstractDetailsDescriptionPresenter.ViewHolder onCreateViewHolder (ViewGroup parent)

创建一个新的 View

Parameters
parent ViewGroup
Returns
AbstractDetailsDescriptionPresenter.ViewHolder

onUnbindViewHolder

void onUnbindViewHolder (Presenter.ViewHolder viewHolder)

从项目中View绑定View 任何昂贵的参考资料可能会在此处发布,并且任何未绑定到每个项目的字段都应在此处清除。

Parameters
viewHolder Presenter.ViewHolder

onViewAttachedToWindow

void onViewAttachedToWindow (Presenter.ViewHolder holder)

当此演示者创建的视图已附加到窗口时调用。

这可以用作视图即将被用户看到的合理信号。 如果适配器先前释放了onViewDetachedFromWindow(ViewHolder)任何资源,则应在此恢复这些资源。

Parameters
holder Presenter.ViewHolder: Holder of the view being attached

onViewDetachedFromWindow

void onViewDetachedFromWindow (Presenter.ViewHolder holder)

当此演示者创建的视图已从窗口分离时调用。

脱离窗口不一定是永久的条件; 演示者视图的使用者可以选择在屏幕不可见时缓存屏幕外的视图,并根据需要附加和分离视图。

Any view property animations should be cancelled here or the view may fail to be recycled.

Parameters
holder Presenter.ViewHolder: Holder of the view being detached

Protected methods

onBindDescription

void onBindDescription (AbstractDetailsDescriptionPresenter.ViewHolder vh, 
                Object item)

将项目中的数据绑定到ViewHolder。 该项目通常与DetailsOverviewRowPlaybackControlsRow

Parameters
vh AbstractDetailsDescriptionPresenter.ViewHolder: The ViewHolder for this details description view.
item Object: The item being presented.

Hooray!