diff options
author | Xavier Ducrohet <xav@android.com> | 2011-03-10 10:55:52 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-03-10 12:05:57 -0800 |
commit | 05a841f03e48820361a9f7f7b4eb36cc8f621f47 (patch) | |
tree | 521808a6e7137699697f12b5b8c592075febc31b /layoutlib_api/src/com/android/ide/common/rendering/api | |
parent | 99cd29edb7cc7c11d3f71222bdfde15314fffba9 (diff) | |
download | sdk-05a841f03e48820361a9f7f7b4eb36cc8f621f47.zip sdk-05a841f03e48820361a9f7f7b4eb36cc8f621f47.tar.gz sdk-05a841f03e48820361a9f7f7b4eb36cc8f621f47.tar.bz2 |
Make inline ResourceItem able to generate ResourceValue
This change fix the issue that since the simplification of
the resource repository, the resource item for inline ID values
would not be called to generate a ResourceValue since their
list of source file was empty.
This moves the creation of the ResourceValue to the ResourceItem
so that InlineResourceItem can override it.
This required moving findMatchingConfigurable into FolderConfiguration
which is a much better place for it anyway.
Change-Id: I36d6b148528c593ea432c9fd0ac8d542cbe2a26e
Diffstat (limited to 'layoutlib_api/src/com/android/ide/common/rendering/api')
-rw-r--r-- | layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java b/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java index f15d903..730d5c1 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/ResourceValue.java @@ -27,19 +27,19 @@ public class ResourceValue implements IResourceValue { private final ResourceType mType; private final String mName; private String mValue = null; - private final boolean mIsFramwork; + private final boolean mIsFramework; - public ResourceValue(ResourceType type, String name, boolean isFramwork) { + public ResourceValue(ResourceType type, String name, boolean isFramework) { mType = type; mName = name; - mIsFramwork = isFramwork; + mIsFramework = isFramework; } public ResourceValue(ResourceType type, String name, String value, boolean isFramework) { mType = type; mName = name; mValue = value; - mIsFramwork = isFramework; + mIsFramework = isFramework; } public ResourceType getResourceType() { @@ -50,6 +50,7 @@ public class ResourceValue implements IResourceValue { * Returns the type of the resource. For instance "drawable", "color", etc... * @deprecated use {@link #getResourceType()} instead. */ + @Deprecated public String getType() { return mType.getName(); } @@ -73,7 +74,7 @@ public class ResourceValue implements IResourceValue { * resource (<code>false</false>). */ public final boolean isFramework() { - return mIsFramwork; + return mIsFramework; } /** @@ -94,8 +95,8 @@ public class ResourceValue implements IResourceValue { @Override public String toString() { - return "ResourceValue [" + mType + "/" + mName + " = " + mValue - + " (framework:" + mIsFramwork + ")]"; + return "ResourceValue [" + mType + "/" + mName + " = " + mValue //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + " (framework:" + mIsFramework + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ } |