Android APIs
public class

DetailsOverviewRowPresenter

extends RowPresenter
java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter
     ↳ android.support.v17.leanback.widget.RowPresenter
       ↳ android.support.v17.leanback.widget.DetailsOverviewRowPresenter

Class Overview

A DetailsOverviewRowPresenter renders a DetailsOverviewRow to display an overview of an item. Typically this row will be the first row in a fragment such as the DetailsFragment. View created by DetailsOverviewRowPresenter is made in three parts: ImageView on the left, action list view on the bottom and a customizable detailed description view on the right.

The detailed description is rendered using a Presenter passed in DetailsOverviewRowPresenter(Presenter). User can access detailed description ViewHolder from mDetailsDescriptionViewHolder.

To participate in activity transition, call setSharedElementEnterTransition(Activity, String) during Activity's onCreate().

Because transition support and layout are fully controlled by DetailsOverviewRowPresenter, developer can not override DetailsOverviewRowPresenter.ViewHolder for adding/replacing views of DetailsOverviewRowPresenter. If developer wants more customization beyond replacing detailed description , he/she should write a new presenter class for row object.

Summary

Nested Classes
class DetailsOverviewRowPresenter.ViewHolder A ViewHolder for the DetailsOverviewRow. 
Public Constructors
DetailsOverviewRowPresenter(Presenter detailsPresenter)
Constructor for a DetailsOverviewRowPresenter.
Public Methods
int getBackgroundColor()
Returns the background color.
OnActionClickedListener getOnActionClickedListener()
Gets the listener for Action click events.
boolean isStyleLarge()
Returns true if the layout style is large.
final boolean isUsingDefaultSelectEffect()
Return whether this RowPresenter is using the default dimming effect provided by the library.
void setBackgroundColor(int color)
Sets the background color.
void setOnActionClickedListener(OnActionClickedListener listener)
Sets the listener for Action click events.
final void setSharedElementEnterTransition(Activity activity, String sharedElementName)
Set enter transition of target activity (typically a DetailActivity) to be transiting into overview row created by this presenter.
final void setSharedElementEnterTransition(Activity activity, String sharedElementName, long timeoutMs)
Set enter transition of target activity (typically a DetailActivity) to be transiting into overview row created by this presenter.
void setStyleLarge(boolean large)
Sets the layout style to be large or small.
Protected Methods
RowPresenter.ViewHolder createRowViewHolder(ViewGroup parent)
Called to create a ViewHolder object for a Row.
void onBindRowViewHolder(RowPresenter.ViewHolder holder, Object item)
void onRowViewSelected(RowPresenter.ViewHolder vh, boolean selected)
Subclass may override this to respond to selected state changes of a Row.
void onSelectLevelChanged(RowPresenter.ViewHolder holder)
Callback when select level is changed.
void onUnbindRowViewHolder(RowPresenter.ViewHolder holder)
[Expand]
Inherited Methods
From class android.support.v17.leanback.widget.RowPresenter
From class android.support.v17.leanback.widget.Presenter
From class java.lang.Object

Public Constructors

public DetailsOverviewRowPresenter (Presenter detailsPresenter)

Constructor for a DetailsOverviewRowPresenter.

Parameters
detailsPresenter The Presenter used to render the detailed description of the row.

Public Methods

public int getBackgroundColor ()

Returns the background color. If no background color was set, transparent is returned.

public OnActionClickedListener getOnActionClickedListener ()

Gets the listener for Action click events.

public boolean isStyleLarge ()

Returns true if the layout style is large.

public final boolean isUsingDefaultSelectEffect ()

Return whether this RowPresenter is using the default dimming effect provided by the library. Subclasses may(most likely) return false and override onSelectLevelChanged(ViewHolder).

public void setBackgroundColor (int color)

Sets the background color. If not set, a default from the theme will be used.

public void setOnActionClickedListener (OnActionClickedListener listener)

Sets the listener for Action click events.

public final void setSharedElementEnterTransition (Activity activity, String sharedElementName)

Set enter transition of target activity (typically a DetailActivity) to be transiting into overview row created by this presenter. The transition will be cancelled if overview image is not loaded in a default timeout period.

It assumes shared element passed from calling activity is an ImageView; the shared element transits to overview image on the left of detail overview row, while bounds of overview row grows and reveals text and buttons on the right.

The method must be invoked in target Activity's onCreate().

public final void setSharedElementEnterTransition (Activity activity, String sharedElementName, long timeoutMs)

Set enter transition of target activity (typically a DetailActivity) to be transiting into overview row created by this presenter. The transition will be cancelled if overview image is not loaded in the timeout period.

It assumes shared element passed from calling activity is an ImageView; the shared element transits to overview image on the left of detail overview row, while bounds of overview row grows and reveals text and buttons on the right.

The method must be invoked in target Activity's onCreate().

public void setStyleLarge (boolean large)

Sets the layout style to be large or small. This affects the height of the overview, including the text description. The default is large.

Protected Methods

protected RowPresenter.ViewHolder createRowViewHolder (ViewGroup parent)

Called to create a ViewHolder object for a Row. Subclasses will override this method to return a different concrete ViewHolder object.

Parameters
parent The parent View for the Row's view holder.
Returns
  • A ViewHolder for the Row's View.

protected void onBindRowViewHolder (RowPresenter.ViewHolder holder, Object item)

protected void onRowViewSelected (RowPresenter.ViewHolder vh, boolean selected)

Subclass may override this to respond to selected state changes of a Row. Subclass may make visual changes to Row view but must not create animation on the Row view.

protected void onSelectLevelChanged (RowPresenter.ViewHolder holder)

Callback when select level is changed. The default implementation applies the select level to setSelectLevel(RowHeaderPresenter.ViewHolder, float) when getSelectEffectEnabled() is true. Subclasses may override this function and implement a different select effect. In this case, you should also override isUsingDefaultSelectEffect() to disable the default dimming effect applied by the library.

protected void onUnbindRowViewHolder (RowPresenter.ViewHolder holder)