public class ItemGroup extends AbstractItemHierarchy implements ItemInflater.ItemParent, ItemHierarchy.Observer
ItemHierarchy.Observer
Constructor and Description |
---|
ItemGroup() |
ItemGroup(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(ItemHierarchy child)
Add a child hierarchy to this item group.
|
void |
clear()
Remove all children from this hierarchy.
|
ItemHierarchy |
findItemById(int id)
Find an item hierarchy within this hierarchy which has the given ID.
|
int |
getCount() |
IItem |
getItemAt(int position)
Get the item at position.
|
void |
onChanged(ItemHierarchy hierarchy)
Called when an underlying data update that can cause this hierarchy to show different
content has occurred.
|
boolean |
removeChild(ItemHierarchy child)
Remove a previously added child from this item group.
|
getId, notifyChanged, registerObserver, setId, unregisterObserver
public ItemGroup()
public ItemGroup(Context context, AttributeSet attrs)
public void addChild(ItemHierarchy child)
addChild
in interface ItemInflater.ItemParent
public boolean removeChild(ItemHierarchy child)
public void clear()
public int getCount()
getCount
in interface ItemHierarchy
public IItem getItemAt(int position)
ItemHierarchy
getItemAt
in interface ItemHierarchy
position
- An integer from 0 to ItemHierarchy.getCount()
}, which indicates the position in
this item hierarchy to get the child item.position
. Must not be null
.public void onChanged(ItemHierarchy hierarchy)
ItemHierarchy.Observer
onChanged
in interface ItemHierarchy.Observer
public ItemHierarchy findItemById(int id)
ItemHierarchy
findItemById
in interface ItemHierarchy
id
- An ID to search for in this item hierarchy.