class Row

Known direct subclasses
DetailsOverviewRow

An overview Row for a details fragment.

DividerRow

Used to represent divider in HeadersFragment.

ListRow

A Row composed of a optional HeaderItem, and an ObjectAdapter describing the items in the list.

PageRow

Used to represent content spanning full page.

PlaybackControlsRow

A Row of playback controls to be displayed by a PlaybackControlsRowPresenter.

SectionRow

Used to represent section item in HeadersFragment.


The base class for all rows. A commonly used subclass is the ListRow. Custom subclasses may define other types of rows.

Summary

Public constructors

Row()

Constructor for a Row.

Row(headerItem: HeaderItem!)

Constructor for a Row.

Row(id: Long, headerItem: HeaderItem!)

Constructor for a Row.

Public functions

HeaderItem!

Returns the HeaderItem that represents metadata for the row.

Long

Returns a unique identifier for this row.

Boolean

Returns true if this Row can be rendered in a visible row view, false otherwise.

Unit
setHeaderItem(headerItem: HeaderItem!)

Sets the HeaderItem that represents metadata for the row.

Unit
setId(id: Long)

Sets the id for this row.

Public constructors

Row

Added in 1.1.0
Row()

Constructor for a Row.

Row

Added in 1.1.0
Row(headerItem: HeaderItem!)

Constructor for a Row.

Parameters
headerItem: HeaderItem!

The HeaderItem for this Row, or null if there is no header.

Row

Added in 1.1.0
Row(id: Long, headerItem: HeaderItem!)

Constructor for a Row.

Parameters
id: Long

The id of the row.

headerItem: HeaderItem!

The HeaderItem for this Row, or null if there is no header.

Public functions

getHeaderItem

Added in 1.1.0
fun getHeaderItem(): HeaderItem!

Returns the HeaderItem that represents metadata for the row.

Returns
HeaderItem!

The HeaderItem for this row, or null if unset.

getId

Added in 1.1.0
fun getId(): Long

Returns a unique identifier for this row. This id can come from one of three places:

  • If setId is ever called on this row, it will return this id.
  • If setId has not been called but the header item is not null, the result of getId is returned.
  • Otherwise NO_ID is returned.

isRenderedAsRowView

Added in 1.1.0
fun isRenderedAsRowView(): Boolean

Returns true if this Row can be rendered in a visible row view, false otherwise. For example ListRow is rendered by ListRowPresenter. PageRow, SectionRow, DividerRow are rendered as invisible row views.

Returns
Boolean

True if this Row can be rendered in a visible row view, false otherwise.

setHeaderItem

Added in 1.1.0
fun setHeaderItem(headerItem: HeaderItem!): Unit

Sets the HeaderItem that represents metadata for the row.

Parameters
headerItem: HeaderItem!

The HeaderItem for this Row, or null if there is no header.

setId

Added in 1.1.0
fun setId(id: Long): Unit

Sets the id for this row.

Parameters
id: Long

The id of the row.