public class ArrayResourceValue extends ResourceValue implements java.lang.Iterable<java.lang.String>
ResourceValue
items, one for array element.mNamespaceResolver, mValue| Constructor and Description |
|---|
ArrayResourceValue(ResourceReference reference,
java.lang.String libraryName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(java.lang.String value)
Adds an element into the array
|
protected int |
getDefaultIndex()
Returns the index of the element to pick by default if a client
of layoutlib asks for the
getValue() rather than the more
specific ArrayResourceValue iteration methods |
java.lang.String |
getElement(int index)
Returns the array element value at the given index position.
|
int |
getElementCount()
Returns the number of elements in this array
|
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML.
|
java.util.Iterator<java.lang.String> |
iterator()
Returns an iterator over the resource values
|
equals, getLibraryName, getRawXmlValue, getReference, hashCode, isUserDefined, replaceWith, setNamespaceLookup, setValue, toStringgetName, getNamespace, getRelativeResourceUrl, getResourceType, getResourceUrl, isFrameworkpublic ArrayResourceValue(@NonNull
ResourceReference reference,
@Nullable
java.lang.String libraryName)
public void addElement(java.lang.String value)
public int getElementCount()
public java.lang.String getElement(int index)
index - index, which must be in the range [0..getElementCount()].public java.util.Iterator<java.lang.String> iterator()
iterator in interface java.lang.Iterable<java.lang.String>protected int getDefaultIndex()
getValue() rather than the more
specific ArrayResourceValue iteration methodspublic java.lang.String getValue()
ResourceValuenull,
for example for instances of StyleResourceValue.getValue in class ResourceValue