added in version 22.1.0
belongs to Maven artifact


public abstract class RowPresenter
extends Presenter

Known Direct Subclasses
Known Indirect Subclasses

An abstract Presenter that renders an Object in RowsFragment, the object can be subclass Row or a generic one. When the object is not Row class, getRow() returns null.

Customize UI widgets

When a subclass of RowPresenter adds UI widgets, it should subclass RowPresenter.ViewHolder and override createRowViewHolder(ViewGroup) and initializeRowViewHolder(ViewHolder). The subclass must use layout id "row_content" for the widget that will be aligned to the title of any HeadersFragment that may exist in the parent fragment. RowPresenter contains an optional and replaceable RowHeaderPresenter that renders the header. You can disable the default rendering or replace the Presenter with a new header presenter by calling setHeaderPresenter(RowHeaderPresenter).

UI events from fragments

RowPresenter receives calls from its parent (typically a Fragment) when:

Activated status

The activated status of a row is applied to the row view and its children via setActivated(boolean). The activated status is typically used to control BaseCardView info region visibility. The row's activated status can be controlled by selected status and/or expanded status. Call setSyncActivatePolicy(int) and choose one of the four policies:

User events

RowPresenter provides OnItemViewSelectedListener and OnItemViewClickedListener. If a subclass wants to add its own View.OnFocusChangeListener or View.OnClickListener, it must do that in createRowViewHolder(ViewGroup) to be properly chained by the library. Adding View listeners after