|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.ide.common.resources.ResourceItem
com.android.ide.common.resources.InlineResourceItem
public class InlineResourceItem
Represents a resource item that has been declared inline in another resource file.
This covers the typical ID declaration of "@+id/foo", but does not cover normal value
resources declared in strings.xml or other similar value files.
This resource will return true
for isDeclaredInline()
and false
for
isEditableDirectly()
.
Constructor Summary | |
---|---|
InlineResourceItem(java.lang.String name)
Constructs a new inline ResourceItem. |
Method Summary | |
---|---|
com.android.ide.common.rendering.api.ResourceValue |
getResourceValue(com.android.resources.ResourceType type,
FolderConfiguration referenceConfig,
boolean isFramework)
Returns a ResourceValue for this item based on the given configuration. |
boolean |
isDeclaredInline()
Returns whether the ID resource has been declared inline inside another resource XML file. |
boolean |
isEditableDirectly()
Returns whether the resource is editable directly. |
java.lang.String |
toString()
|
Methods inherited from class com.android.ide.common.resources.ResourceItem |
---|
add, compareTo, getAlternateCount, getName, getSourceFileArray, getSourceFileList, getXmlString, hasAlternates, hasDefault, hasNoSourceFile, removeFile, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InlineResourceItem(java.lang.String name)
name
- the name of the resource as it appears in the XML and R.java files.Method Detail |
---|
public boolean isDeclaredInline()
ResourceItem
ResourceType.ID
, this will always return false
.
isDeclaredInline
in class ResourceItem
public boolean isEditableDirectly()
ResourceItem
ResourceType.ID
that aren't declared inline.
isEditableDirectly
in class ResourceItem
public com.android.ide.common.rendering.api.ResourceValue getResourceValue(com.android.resources.ResourceType type, FolderConfiguration referenceConfig, boolean isFramework)
ResourceItem
ResourceValue
for this item based on the given configuration.
If the ResourceItem has several source files, one will be selected based on the config.
getResourceValue
in class ResourceItem
type
- the type of the resource. This is necessary because ResourceItem doesn't embed
its type, but ResourceValue does.referenceConfig
- the config of the resource item.isFramework
- whether the resource is a framework value. Same as the type.
public java.lang.String toString()
toString
in class ResourceItem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |