com.android.ide.common.rendering.api
Class DataBindingItem

java.lang.Object
  extended by 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().


Constructor Summary
DataBindingItem(ResourceReference reference, int count)
           
DataBindingItem(java.lang.String name)
           
DataBindingItem(java.lang.String name, boolean platformLayout)
           
DataBindingItem(java.lang.String name, boolean platformLayout, int count)
           
DataBindingItem(java.lang.String name, int count)
           
 
Method Summary
 void addChild(DataBindingItem child)
           
 java.util.List<DataBindingItem> getChildren()
           
 int getCount()
          The repeat count for this object or the repeat count for the children if there are any.
 ResourceReference getViewReference()
          Returns the ResourceReference for the view.
 java.util.Iterator<DataBindingItem> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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>