java.lang.Object | |
↳ | com.sap.cloud.mobile.fiori.hierarchy.HierarchyViewItemAdapter<T extends java.io.Serializable, K extends com.sap.cloud.mobile.fiori.hierarchy.HierarchyView.CellHolder> |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HierarchyViewItemAdapter() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final void |
notifyChildrenChanged(T parentId)
Notify the adapter that the children for parent have changed
| ||||||||||
final void |
notifyChildrenRangeInserted(T parentId, int pos, int count)
Notify that given number of new children inserted for given parent.
| ||||||||||
final void |
notifyChildrenRangeRemoved(T parentId, int pos, int count)
Notify that give number of children have been removed from the hierarchy.
| ||||||||||
final void |
notifyHierarchyChanged()
Notify that complete data set backing this hierarchy view has changed.
| ||||||||||
final void |
notifyItemChanged(T id)
Notify the adapter that the children for parent have changed
| ||||||||||
final void |
notifyParentChanged(T id)
Notify that the parent of the given child id has changed
| ||||||||||
void |
setHierarchyItemClickListener(HierarchyItemClickListener<T> hierarchyItemClickListener)
Set the item click listener
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
getChildCountForParent(T id)
Given the id of the item provide how many children does it have
| ||||||||||
abstract T |
getChildId(T parentId, int pos)
Get the id of the child at given position in parent children hierarchy
| ||||||||||
abstract T |
getParentId(T id)
Given the id of child return the id of the parent
| ||||||||||
abstract T |
getRootId()
Get the id of the item which should be the root of the HierarchyView
| ||||||||||
abstract CharSequence |
getTitle(T id)
Get the title for the given id
| ||||||||||
abstract void |
onBindItemViewHolder(K holder, T id)
Bind the item provided in ItemViewHolder with given id
| ||||||||||
abstract K |
onCreateItemViewHolder()
Create the View Holder
| ||||||||||
void | onViewRecycled(K holder) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Notify the adapter that the children for parent have changed
parentId | id of the parent |
---|
Notify that given number of new children inserted for given parent. If the Hierarchy view is not representing the children of the given parent than this results in no-op. Else new items will be inserted in the column.
parentId | parent id |
---|---|
pos | position at which items are inserted |
count | number of new items inserted |
Notify that give number of children have been removed from the hierarchy. If the Hierarchy view is not representing the children of the given parent than this results in no-op. Else new items will be inserted in the column.
parentId | parent id |
---|---|
pos | position at which items are inserted |
count | number of new items inserted |
Notify that complete data set backing this hierarchy view has changed.
Notify the adapter that the children for parent have changed
id | id of the parent |
---|
Notify that the parent of the given child id has changed
Set the item click listener
Given the id of the item provide how many children does it have
Get the id of the child at given position in parent children hierarchy
Given the id of child return the id of the parent
Get the id of the item which should be the root of the HierarchyView
Bind the item provided in ItemViewHolder with given id
Create the View Holder