M - Model class for the item to be displayedpublic class ItemSection<M> extends Section
| Constructor and Description |
|---|
ItemSection()
No-arg constructor for ItemSection.
|
ItemSection(M item)
Initializes the ItemSection with the item passed.
|
| Modifier and Type | Method and Description |
|---|---|
M |
getItem()
Returns the item added to this ItemSection.
|
void |
removeItem()
Removes the item added to this section.
|
void |
setItem(M item)
Sets the item for this section.
|
addDecorator, addDecorator, hideSection, isSectionHidden, onChanged, onInserted, onMoved, onRemoved, removeAllDecorators, removeDecorator, removeDecorator, setExpansionMode, setSectionExpansionMode, setSelectionMode, setSpanCount, showSectionpublic ItemSection()
item as null. This
results the item not to be displayed in the recyclerview. Call setItem(Object) to set the item.public ItemSection(M item)
item - Item that needs to be set for this ItemSection.public M getItem()
public void removeItem()
public void setItem(M item)
RecyclerView.Adapter#notifyItemChanged(int) method is called internally or RecyclerView.Adapter#notifyItemInserted(int).
If you are passing null, the method exits silently.item - Item that needs to be set for this section.