|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.ide.common.rendering.api.ResourceReference
com.android.ide.common.rendering.api.ResourceValue
com.android.ide.common.rendering.api.PluralsResourceValue
public class PluralsResourceValue
Represents an android plurals resource
Field Summary |
---|
Fields inherited from class com.android.ide.common.rendering.api.ResourceValue |
---|
mValue |
Constructor Summary | |
---|---|
PluralsResourceValue(java.lang.String name,
boolean isFramework)
Constructs a new PluralsResourceValue |
Method Summary | |
---|---|
void |
addPlural(java.lang.String quantity,
java.lang.String value)
Adds an element into the array |
int |
getPluralsCount()
Returns the number of plural string |
java.lang.String |
getQuantity(int index)
Returns the quantity at the given index, such as "one", "two", "few", etc. |
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML. |
java.lang.String |
getValue(int index)
Returns the string element at the given index position. |
java.lang.String |
getValue(java.lang.String quantity)
Returns the string element for the given quantity |
Methods inherited from class com.android.ide.common.rendering.api.ResourceValue |
---|
equals, getRawXmlValue, getResourceType, getType, hashCode, replaceWith, setValue, toString |
Methods inherited from class com.android.ide.common.rendering.api.ResourceReference |
---|
getName, isFramework |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.android.layoutlib.api.IResourceValue |
---|
getName, isFramework |
Constructor Detail |
---|
public PluralsResourceValue(java.lang.String name, boolean isFramework)
name
- the name of the arrayisFramework
- whether this is a framework resourceMethod Detail |
---|
public void addPlural(java.lang.String quantity, java.lang.String value)
public int getPluralsCount()
public java.lang.String getQuantity(int index)
index
- the index, which must be in the range [0..getPluralsCount()].
public java.lang.String getValue(int index)
index
- index, which must be in the range [0..getPluralsCount()].
public java.lang.String getValue(java.lang.String quantity)
quantity
- the quantity string, such as "one", "two", "few", etc.
public java.lang.String getValue()
ResourceValue
null
getValue
in interface IResourceValue
getValue
in class ResourceValue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |