aboutsummaryrefslogtreecommitdiffstats
path: root/layoutlib_api
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-06-06 15:29:32 -0700
committerXavier Ducrohet <xav@android.com>2011-06-06 15:32:18 -0700
commit3301da3ae01b2a756178265403fb33b512a166dd (patch)
tree8c2f0525a9e50c8891fa200cca14e5b3ce44d8aa /layoutlib_api
parent717a5e55cf0379f3a1588e4f30a6ca321e91f402 (diff)
downloadsdk-3301da3ae01b2a756178265403fb33b512a166dd.zip
sdk-3301da3ae01b2a756178265403fb33b512a166dd.tar.gz
sdk-3301da3ae01b2a756178265403fb33b512a166dd.tar.bz2
Add a new getParser method to IProjectCallback.
This is used to make the implementation easier with access to the XML file path in the ResourceValue. Change-Id: Iedbb194bdf4b3d17841be1d50c384b62615bae8f
Diffstat (limited to 'layoutlib_api')
-rw-r--r--layoutlib_api/src/com/android/ide/common/rendering/api/Bridge.java2
-rw-r--r--layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java10
2 files changed, 11 insertions, 1 deletions
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/Bridge.java b/layoutlib_api/src/com/android/ide/common/rendering/api/Bridge.java
index d5a1829..026907e 100644
--- a/layoutlib_api/src/com/android/ide/common/rendering/api/Bridge.java
+++ b/layoutlib_api/src/com/android/ide/common/rendering/api/Bridge.java
@@ -32,7 +32,7 @@ import java.util.Map;
*/
public abstract class Bridge {
- public final static int API_CURRENT = 6;
+ public final static int API_CURRENT = 7;
/**
* Returns the API level of the layout library.
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 b91b598..d35ca35 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
@@ -97,10 +97,20 @@ public interface IProjectCallback {
* Returns a custom parser for the layout of the given name.
* @param layoutName the name of the layout.
* @return returns a custom parser or null if no custom parsers are needed.
+ * @deprecated This is replaced by {@link #getParser(ResourceValue)} but older version
+ * of the layoutlib (before API7) will still call this method.
*/
+ @Deprecated
ILayoutPullParser getParser(String layoutName);
/**
+ * Returns a custom parser for a given layout.
+ * @param layoutResource The layout.
+ * @return returns a custom parser or null if no custom parsers are needed.
+ */
+ ILayoutPullParser getParser(ResourceValue layoutResource);
+
+ /**
* Returns the value of an item used by an adapter.
* @param adapterView The {@link ResourceReference} for the adapter view info.
* @param adapterCookie the view cookie for this particular view.