From 8e74a1196cc2b6b2479ec060c22bf66df67c9e15 Mon Sep 17 00:00:00 2001 From: Raphael Moll Date: Fri, 23 Jul 2010 16:48:12 -0400 Subject: ADT GLE2: Deal with missing custom view classes. - Detect missing view classes and replace them by a MockView. (This alone makes the rendering useful instead of not updating it on error.) - Display the name of the missing view classes. - Make them hot links and display the New Class Wizard to create them. Change-Id: I20b69db5428751c4a6c1367103462b3867fa9c7d --- .../src/com/android/layoutlib/api/IProjectCallback.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'layoutlib_api') diff --git a/layoutlib_api/src/com/android/layoutlib/api/IProjectCallback.java b/layoutlib_api/src/com/android/layoutlib/api/IProjectCallback.java index 5ad5082..fbdd918 100644 --- a/layoutlib_api/src/com/android/layoutlib/api/IProjectCallback.java +++ b/layoutlib_api/src/com/android/layoutlib/api/IProjectCallback.java @@ -22,36 +22,36 @@ package com.android.layoutlib.api; * resource resolution, namespace information, and instantiation of custom view. */ public interface IProjectCallback { - + /** * Loads a custom view with the given constructor signature and arguments. * @param name The fully qualified name of the class. * @param constructorSignature The signature of the class to use * @param constructorArgs The arguments to use on the constructor * @return A newly instantiated android.view.View object. - * @throws ClassNotFoundException. - * @throws Exception + * @throws ClassNotFoundException + * @throws Exception */ @SuppressWarnings("unchecked") Object loadView(String name, Class[] constructorSignature, Object[] constructorArgs) throws ClassNotFoundException, Exception; - + /** * Returns the namespace of the application. *

This lets the Layout Lib load custom attributes for custom views. */ String getNamespace(); - + /** * Resolves the id of a resource Id. *

The resource id is the value of a R.<type>.<name>, 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. + * does not match any resource. */ String[] resolveResourceValue(int id); - + /** * Resolves the id of a resource Id of type int[] *

The resource id is the value of a R.styleable.<name>, and this method will @@ -60,7 +60,7 @@ public interface IProjectCallback { * @return the name of the resource or null if not found. */ String resolveResourceValue(int[] id); - + /** * Returns the id of a resource. *

The provided type and name must match an existing constant defined as -- cgit v1.1