import com.android.ide.common.rendering.api.IProjectCallback;
import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceReference;
+import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.Result;
import com.android.ide.common.rendering.legacy.LegacyCallback;
import com.android.ide.eclipse.adt.AdtConstants;
return null;
}
+ public ILayoutPullParser getParser(ResourceValue layoutResource) {
+ return getParser(layoutResource.getName());
+ }
+
public Object getAdapterItemValue(ResourceReference adapterView, Object adapterCookie,
ResourceReference itemRef,
int fullPosition, int typePosition, int fullChildPosition, int typeChildPosition,
*/
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.
* 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.