Register now for Android Dev Summit 2019!

ListRow

open class ListRow : Row
kotlin.Any
   ↳ androidx.leanback.widget.Row
   ↳ androidx.leanback.widget.ListRow

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

Summary

Public constructors

<init>(header: HeaderItem!, adapter: ObjectAdapter!)

<init>(id: Long, header: HeaderItem!, adapter: ObjectAdapter!)

<init>(adapter: ObjectAdapter!)

Public methods

ObjectAdapter!

Returns the ObjectAdapter that represents a list of objects.

open CharSequence!

Returns content description for the ListRow.

open Unit
setContentDescription(contentDescription: CharSequence!)

Explicitly set content description for the ListRow, getContentDescription() will ignore values from HeaderItem.

Inherited functions

Public constructors

<init>

ListRow(header: HeaderItem!, adapter: ObjectAdapter!)

<init>

ListRow(id: Long, header: HeaderItem!, adapter: ObjectAdapter!)

<init>

ListRow(adapter: ObjectAdapter!)

Public methods

getAdapter

fun getAdapter(): ObjectAdapter!

Returns the ObjectAdapter that represents a list of objects.

getContentDescription

open fun getContentDescription(): CharSequence!

Returns content description for the ListRow. By default it returns HeaderItem#getContentDescription() or HeaderItem#getName(), unless setContentDescription(CharSequence) was explicitly called.

Return
CharSequence!: Content description for the ListRow.

setContentDescription

open fun setContentDescription(contentDescription: CharSequence!): Unit

Explicitly set content description for the ListRow, getContentDescription() will ignore values from HeaderItem.

Parameters
contentDescription CharSequence!: Content description sets on the ListRow.