H
- The header item objectM
- The list item objectpublic class HeaderSection<H,M> extends NestedSection implements Notifier
Section to display list of items with a header. Internally it comprises of an ItemSection and ListSection. HeaderSection can be used with GridLayoutManager or LinearLayoutManager
It provides the collapsing and expanding feature. If the section is collapsed the getCount() will
return 1. To collapse the section call ItemViewHolder.toggleSectionExpansion()
.
Constructor and Description |
---|
HeaderSection()
Initializes the HeaderSection.
|
HeaderSection(H header)
Initializes the HeaderSection with header object.
|
Modifier and Type | Method and Description |
---|---|
H |
getHeader()
Returns the header object.
|
ListSection<M> |
getListSection()
Use this method to get the ListSection which is inside the HeaderSection.
|
void |
setHeader(H header)
Sets the header object.
|
addSection, notifySectionItemMoved, notifySectionRangeChanged, notifySectionRangeInserted, notifySectionRangeRemoved, onItemClicked
addDecorator, addDecorator, hideSection, isSectionHidden, onChanged, onInserted, onMoved, onRemoved, removeAllDecorators, removeDecorator, removeDecorator, setExpansionMode, setSectionExpansionMode, setSelectionMode, setSpanCount, showSection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notifySectionItemMoved, notifySectionRangeChanged, notifySectionRangeInserted, notifySectionRangeRemoved
public HeaderSection()
setHeader(H)
to set the header.public HeaderSection(H header)
header
- object to be set as headerpublic H getHeader()
public ListSection<M> getListSection()
public void setHeader(H header)
header
- object to be set as header