public abstract class

HierarchyViewItemAdapter

extends Object
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>

Summary

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
From class java.lang.Object

Public Constructors

public HierarchyViewItemAdapter ()

Public Methods

public final void notifyChildrenChanged (T parentId)

Notify the adapter that the children for parent have changed

Parameters
parentId id of the parent

public final void notifyChildrenRangeInserted (T parentId, int pos, int count)

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.

Parameters
parentId parent id
pos position at which items are inserted
count number of new items inserted

public final void notifyChildrenRangeRemoved (T parentId, int pos, int count)

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.

Parameters
parentId parent id
pos position at which items are inserted
count number of new items inserted

public final void notifyHierarchyChanged ()

Notify that complete data set backing this hierarchy view has changed.

public final void notifyItemChanged (T id)

Notify the adapter that the children for parent have changed

Parameters
id id of the parent

public final void notifyParentChanged (T id)

Notify that the parent of the given child id has changed

public void setHierarchyItemClickListener (HierarchyItemClickListener<T> hierarchyItemClickListener)

Set the item click listener

Protected Methods

protected abstract int getChildCountForParent (T id)

Given the id of the item provide how many children does it have

protected abstract T getChildId (T parentId, int pos)

Get the id of the child at given position in parent children hierarchy

protected abstract T getParentId (T id)

Given the id of child return the id of the parent

protected abstract T getRootId ()

Get the id of the item which should be the root of the HierarchyView

protected abstract CharSequence getTitle (T id)

Get the title for the given id

protected abstract void onBindItemViewHolder (K holder, T id)

Bind the item provided in ItemViewHolder with given id

protected abstract K onCreateItemViewHolder ()

Create the View Holder

protected void onViewRecycled (K holder)