public class ItemResourceValue extends ResourceValue
mValue| Constructor and Description |
|---|
ItemResourceValue(java.lang.String name,
boolean isFrameworkAttr,
boolean isFrameworkStyle) |
ItemResourceValue(java.lang.String attributeName,
boolean isFrameworkAttr,
java.lang.String value,
boolean isFrameworkStyle)
If the value is a reference to a framework resource or not is NOT represented with a boolean!
but can be deduced with:
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isFrameworkAttr() |
java.lang.String |
toString() |
equals, getRawXmlValue, getResourceType, getType, getValue, hashCode, replaceWith, setValuegetName, isFrameworkclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetName, isFrameworkpublic ItemResourceValue(java.lang.String name,
boolean isFrameworkAttr,
boolean isFrameworkStyle)
public ItemResourceValue(java.lang.String attributeName,
boolean isFrameworkAttr,
java.lang.String value,
boolean isFrameworkStyle)
boolean isFrameworkValue = item.isFramework() ||
item.getValue().startsWith(SdkConstants.ANDROID_PREFIX) ||
item.getValue().startsWith(SdkConstants.ANDROID_THEME_PREFIX);
For <item name="foo">bar</item>, item in a style resource, the values of the
parameters will be as follows:attributeName - fooisFrameworkAttr - is foo in framework namespace.value - bar (in case of a reference, the value may include the namespace.
if the namespace is absent, default namespace is assumed based on
isFrameworkStyle (android namespace when isFrameworkStyle=true and app
namespace when isFrameworkStyle=false))isFrameworkStyle - if the style is a framework file or project file.public boolean isFrameworkAttr()
public java.lang.String toString()
toString in class ResourceValue