com.android.ide.common.rendering.api
Class DataBindingItem
java.lang.Object
com.android.ide.common.rendering.api.DataBindingItem
- All Implemented Interfaces:
- java.lang.Iterable<DataBindingItem>
public class DataBindingItem
- extends java.lang.Object
- implements java.lang.Iterable<DataBindingItem>
A data binding item. It contain a ResourceReference
to the view used to represent it.
It also contains how many items of this type the AdapterView should display.
It can also contain an optional list of children in case the AdapterView is an
ExpandableListView. In this case, the count value is used as a repeat count for the children,
similar to AdapterBinding.getRepeatCount()
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataBindingItem
public DataBindingItem(ResourceReference reference,
int count)
DataBindingItem
public DataBindingItem(java.lang.String name,
boolean platformLayout,
int count)
DataBindingItem
public DataBindingItem(java.lang.String name,
boolean platformLayout)
DataBindingItem
public DataBindingItem(java.lang.String name,
int count)
DataBindingItem
public DataBindingItem(java.lang.String name)
getViewReference
public ResourceReference getViewReference()
- Returns the
ResourceReference
for the view. The ResourceType
for the
referenced resource is implied to be ResourceType.LAYOUT
.
getCount
public int getCount()
- The repeat count for this object or the repeat count for the children if there are any.
addChild
public void addChild(DataBindingItem child)
getChildren
public java.util.List<DataBindingItem> getChildren()
iterator
public java.util.Iterator<DataBindingItem> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<DataBindingItem>