aboutsummaryrefslogtreecommitdiffstats
path: root/layoutlib_api/src
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-01-28 15:18:32 -0800
committerXavier Ducrohet <xav@android.com>2011-01-28 16:45:05 -0800
commit1f72cb7cb032538b79e79d6fc7ff3905e9766ce1 (patch)
tree65cc57954e239cd9cd3c9e302b4e6ad574667a78 /layoutlib_api/src
parent2e97908089f76b4c270f018cbd2e1762511df183 (diff)
downloadsdk-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/src')
-rw-r--r--layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java12
1 files changed, 6 insertions, 6 deletions
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.&lt;type&gt;.&lt;name&gt;</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);
}