From 05a841f03e48820361a9f7f7b4eb36cc8f621f47 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Thu, 10 Mar 2011 10:55:52 -0800 Subject: 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 --- .../android/ide/common/rendering/api/ResourceValue.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'layoutlib_api/src/com/android') 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 (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$ } -- cgit v1.1