com.android.layoutlib.api
Interface IProjectCallback


Deprecated.

@Deprecated
public interface IProjectCallback


Method Summary
 java.lang.String getNamespace()
          Deprecated. Returns the namespace of the application.
 java.lang.Integer getResourceValue(java.lang.String type, java.lang.String name)
          Deprecated. Returns the id of a resource.
 java.lang.Object loadView(java.lang.String name, java.lang.Class[] constructorSignature, java.lang.Object[] constructorArgs)
          Deprecated. Loads a custom view with the given constructor signature and arguments.
 java.lang.String[] resolveResourceValue(int id)
          Deprecated. Resolves the id of a resource Id.
 java.lang.String resolveResourceValue(int[] id)
          Deprecated. 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 return the name of the resource.

 

Method Detail

loadView

java.lang.Object loadView(java.lang.String name,
                          java.lang.Class[] constructorSignature,
                          java.lang.Object[] constructorArgs)
                          throws java.lang.ClassNotFoundException,
                                 java.lang.Exception
Deprecated. 
Loads a custom view with the given constructor signature and arguments.

Parameters:
name - The fully qualified name of the class.
constructorSignature - The signature of the class to use
constructorArgs - The arguments to use on the constructor
Returns:
A newly instantiated android.view.View object.
Throws:
java.lang.ClassNotFoundException
java.lang.Exception

getNamespace

java.lang.String getNamespace()
Deprecated. 
Returns the namespace of the application.

This lets the Layout Lib load custom attributes for custom views.


resolveResourceValue

java.lang.String[] resolveResourceValue(int id)
Deprecated. 
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.

Parameters:
id - the Id to resolve.
Returns:
an array of 2 strings containing the resource name and type, or null if the id does not match any resource.

resolveResourceValue

java.lang.String resolveResourceValue(int[] id)
Deprecated. 
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 return the name of the resource.

Parameters:
id - the Id to resolve.
Returns:
the name of the resource or null if not found.

getResourceValue

java.lang.Integer getResourceValue(java.lang.String type,
                                   java.lang.String name)
Deprecated. 
Returns the id of a resource.

The provided type and name must match an existing constant defined as R.<type>.<name>.

Parameters:
type - the type of the resource
name - the name of the resource
Returns:
an Integer containing the resource Id, or null if not found.