com.android.ide.common.rendering.api
Class ItemResourceValue
java.lang.Object
com.android.ide.common.rendering.api.ResourceReference
com.android.ide.common.rendering.api.ResourceValue
com.android.ide.common.rendering.api.ItemResourceValue
- All Implemented Interfaces:
- IResourceValue
public class ItemResourceValue
- extends ResourceValue
Represents each item in the android style resource.
|
Constructor Summary |
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: |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ItemResourceValue
public ItemResourceValue(java.lang.String name,
boolean isFrameworkAttr,
boolean isFrameworkStyle)
- See Also:
ItemResourceValue(String, boolean, String, boolean)
ItemResourceValue
public 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:
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:
- Parameters:
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.
isFrameworkAttr
public boolean isFrameworkAttr()