HeaderItem
open class HeaderItem
kotlin.Any | |
↳ | androidx.leanback.widget.HeaderItem |
A header item describes the metadata of a Row
, such as a category of media items. May be subclassed to add more information.
Summary
Public constructors |
|
---|---|
Create a header item. |
|
Create a header item. |
Public methods |
|
---|---|
open CharSequence! |
Returns optional content description for the HeaderItem. |
open CharSequence! |
Returns the description for the current row. |
Long |
getId() Returns a unique identifier for this item. |
String! |
getName() Returns the name of this header item. |
open Unit |
setContentDescription(contentDescription: CharSequence!) Sets optional content description for the HeaderItem. |
open Unit |
setDescription(description: CharSequence!) Sets the description for the current header item. |
Public constructors
Public methods
getContentDescription
open fun getContentDescription(): CharSequence!
Returns optional content description for the HeaderItem. When it is null, getName()
should be used for the content description.
Return | |
---|---|
CharSequence!: Content description for the HeaderItem. |
getDescription
open fun getDescription(): CharSequence!
Returns the description for the current row.
setContentDescription
open fun setContentDescription(contentDescription: CharSequence!): Unit
Sets optional content description for the HeaderItem.
Parameters | |
---|---|
contentDescription |
CharSequence!: Content description sets on the HeaderItem. |
setDescription
open fun setDescription(description: CharSequence!): Unit
Sets the description for the current header item. This will be visible when the row receives focus.