public class ItemResourceValue extends ResourceValue
mValue| Constructor and Description |
|---|
ItemResourceValue(java.lang.String attributeName,
boolean isFrameworkAttr,
java.lang.String value,
boolean isFrameworkStyle,
java.lang.String libraryName)
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, getLibraryName, getRawXmlValue, getResourceType, getResourceUrl, getValue, hashCode, isUserDefined, replaceWith, setValuegetName, isFrameworkpublic ItemResourceValue(java.lang.String attributeName,
boolean isFrameworkAttr,
java.lang.String value,
boolean isFrameworkStyle,
java.lang.String libraryName)
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