public final class LayoutInflaterCompat
extends Object
java.lang.Object | |
android.support.v4.view.LayoutInflaterCompat |
Helper用于访问在向后兼容的API级别4之后引入的 LayoutInflater
功能。
公共方法(Public methods) |
|
---|---|
static LayoutInflaterFactory |
getFactory(LayoutInflater inflater) 返回当前的 |
static void |
setFactory(LayoutInflater inflater, LayoutInflaterFactory factory) 在使用此LayoutInflater时附加一个自定义工厂界面以创建视图。 |
继承方法(Inherited methods) |
|
---|---|
![]() java.lang.Object
|
LayoutInflaterFactory getFactory (LayoutInflater inflater)
返回当前的LayoutInflaterFactory
(或null)。 这在每个元素名称上被调用。 如果工厂返回一个View,将其添加到层次结构中。 如果它返回null,则继续调用onCreateView(name)。
参数(Parameters) | |
---|---|
inflater |
LayoutInflater
|
返回(Returns) | |
---|---|
LayoutInflaterFactory |
The LayoutInflaterFactory associated with the LayoutInflater . Will be null if the inflater does not have a LayoutInflaterFactory but a raw LayoutInflater.Factory . |
也可以看看:
void setFactory (LayoutInflater inflater, LayoutInflaterFactory factory)
在使用此LayoutInflater时附加一个自定义工厂界面以创建视图。 这不能为空,只能设置一次; 设置后,您不能更改工厂。
参数(Parameters) | |
---|---|
inflater |
LayoutInflater
|
factory |
LayoutInflaterFactory
|