diff options
author | Xavier Ducrohet <xav@android.com> | 2011-01-28 15:18:32 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2011-01-28 16:45:05 -0800 |
commit | 1f72cb7cb032538b79e79d6fc7ff3905e9766ce1 (patch) | |
tree | 65cc57954e239cd9cd3c9e302b4e6ad574667a78 /layoutlib_api | |
parent | 2e97908089f76b4c270f018cbd2e1762511df183 (diff) | |
download | sdk-1f72cb7cb032538b79e79d6fc7ff3905e9766ce1.zip sdk-1f72cb7cb032538b79e79d6fc7ff3905e9766ce1.tar.gz sdk-1f72cb7cb032538b79e79d6fc7ff3905e9766ce1.tar.bz2 |
Move Pair and annoatations into resources.jar now renamed as common.jar
Move all the resource query methods that returned an array of 2 Strings
to return a pair of ResourceType and String.
Change-Id: I6b8447aa27005de786e2defef81ad88a72363523
Diffstat (limited to 'layoutlib_api')
-rw-r--r-- | layoutlib_api/.classpath | 2 | ||||
-rw-r--r-- | layoutlib_api/Android.mk | 2 | ||||
-rw-r--r-- | layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/layoutlib_api/.classpath b/layoutlib_api/.classpath index bae87a9..4095535 100644 --- a/layoutlib_api/.classpath +++ b/layoutlib_api/.classpath @@ -3,6 +3,6 @@ <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_SRC/dalvik/libcore/xml/src/main/java"/> - <classpathentry combineaccessrules="false" kind="src" path="/resources"/> + <classpathentry combineaccessrules="false" kind="src" path="/common"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/layoutlib_api/Android.mk b/layoutlib_api/Android.mk index 4ebf1f6..30ce41b 100644 --- a/layoutlib_api/Android.mk +++ b/layoutlib_api/Android.mk @@ -19,7 +19,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-java-files-under,src) LOCAL_JAVA_LIBRARIES := \ - resources \ + common \ kxml2-2.3.0 LOCAL_MODULE := layoutlib_api diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java b/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java index aebc5a5..0ec214f 100644 --- a/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java +++ b/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java @@ -17,6 +17,7 @@ package com.android.ide.common.rendering.api; import com.android.resources.ResourceType; +import com.android.util.Pair; /** * Callback for project information needed by the Layout Library. @@ -49,10 +50,10 @@ public interface IProjectCallback { * <p/>The resource id is the value of a <code>R.<type>.<name></code>, and * this method will return both the type and name of the resource. * @param id the Id to resolve. - * @return an array of 2 strings containing the resource name and type, or null if the id - * does not match any resource. + * @return a Pair of {@link ResourceType} and resource name, or null if the id + * does not match any resource. */ - String[] resolveResourceValue(int id); + Pair<ResourceType, String> resolveResourceId(int id); /** * Resolves the id of a resource Id of type int[] @@ -61,7 +62,7 @@ public interface IProjectCallback { * @param id the Id to resolve. * @return the name of the resource or <code>null</code> if not found. */ - String resolveResourceValue(int[] id); + String resolveResourceId(int[] id); /** * Returns the id of a resource. @@ -71,6 +72,5 @@ public interface IProjectCallback { * @param name the name of the resource * @return an Integer containing the resource Id, or <code>null</code> if not found. */ - Integer getResourceValue(ResourceType type, String name); - + Integer getResourceId(ResourceType type, String name); } |