public class LayoutBoost extends Object
Before the conversion, you need to use the module that could finish commenting and parsing the xml and generating the Java UI code.
| 构造器 | 说明 |
|---|---|
LayoutBoost() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static Component |
inflate(LayoutScatter layoutScatter,
Context context,
int layoutId,
ComponentContainer parent,
boolean attach) |
Converts an XML file into a component.
|
static Component |
inflate(Context context,
int layoutId,
ComponentContainer parent,
boolean attach) |
Converts an XML file into a component.
|
public static Component inflate(Context context, int layoutId, ComponentContainer parent, boolean attach)
context - Indicates the Context object of the application.layoutId - Indicates the ID of the XML file.parent - Indicates the root component.attach - Specifies whether to add the component to the root component.public static Component inflate(LayoutScatter layoutScatter, Context context, int layoutId, ComponentContainer parent, boolean attach) throws IllegalArgumentException
layoutScatter - Indicates the LayoutScatter object.context - Indicates the Context object of the application.layoutId - Indicates the ID of the XML file.parent - Indicates the root component.attach - Specifies whether to add a component to the root component.IllegalArgumentException - Throws this exception if layoutScatter or context is null.