Stay organized with collections Save and categorize content based on your preferences.

HeaderItem

public class 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.

HeaderItem(long id, String name)

Create a header item.

Public methods

CharSequence

Returns optional content description for the HeaderItem.

CharSequence

Returns the description for the current row.

final long

Returns a unique identifier for this item.

final String

Returns the name of this header item.

void
setContentDescription(CharSequence contentDescription)

Sets optional content description for the HeaderItem.

void

Sets the description for the current header item.

Public constructors

HeaderItem

public HeaderItem(String name)

Create a header item.

HeaderItem

public HeaderItem(long id, String name)

Create a header item. All fields are optional.

Public methods

getContentDescription

public CharSequence getContentDescription()

Returns optional content description for the HeaderItem. When it is null, getName should be used for the content description.

Returns
CharSequence

Content description for the HeaderItem.

getDescription

public CharSequence getDescription()

Returns the description for the current row.

getId

public final long getId()

Returns a unique identifier for this item.

getName

public final String getName()

Returns the name of this header item.

setContentDescription

public void setContentDescription(CharSequence contentDescription)

Sets optional content description for the HeaderItem.

Parameters
CharSequence contentDescription

Content description sets on the HeaderItem.

setDescription

public void setDescription(CharSequence description)

Sets the description for the current header item. This will be visible when the row receives focus.