本文整理汇总了Java中android.view.LayoutInflater.Factory类的典型用法代码示例。如果您正苦于以下问题:Java Factory类的具体用法?Java Factory怎么用?Java Factory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Factory类属于android.view.LayoutInflater包,在下文中一共展示了Factory类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerViewFactory
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
/**
* 注册自定义的ViewFactory到LayoutInflater中,实现对View生成的拦截
*
* @param li
*/
public void registerViewFactory(LayoutInflater li) {
Factory factory = li.getFactory();
if (factory instanceof ViewFactory) {
Log.w("Had register factory");
return;
}
if (factory != null && ReflectUtil.get(factory, "mF1") instanceof ViewFactory) {
Log.w("Had register factory");
return;
}
ViewFactory vf;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
vf = new ViewFactory();
} else {
vf = new ViewFactoryAfterGingerbread();
}
vf.register(li);
Log.d("LayoutInflater:{} register custom factory:{}", li, vf);
}
示例2: callActivityOnCreateView
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
View callActivityOnCreateView(View parent, String name, Context context, AttributeSet attrs) {
if (this.mOriginalWindowCallback instanceof Factory) {
View result = ((Factory) this.mOriginalWindowCallback).onCreateView(name, context, attrs);
if (result != null) {
return result;
}
}
return null;
}
示例3: setFactory
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
static void setFactory(LayoutInflater inflater, LayoutInflaterFactory factory) {
Factory2 factory2 = factory != null ? new FactoryWrapperHC(factory) : null;
inflater.setFactory2(factory2);
Factory f = inflater.getFactory();
if (f instanceof Factory2) {
forceSetFactory2(inflater, (Factory2) f);
} else {
forceSetFactory2(inflater, factory2);
}
}
示例4: getFactory
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
static LayoutInflaterFactory getFactory(LayoutInflater inflater) {
Factory factory = inflater.getFactory();
if (factory instanceof FactoryWrapper) {
return ((FactoryWrapper) factory).mDelegateFactory;
}
return null;
}
示例5: m1714b
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
View m1714b(View view, String str, Context context, AttributeSet attributeSet) {
if (this.c instanceof Factory) {
View onCreateView = ((Factory) this.c).onCreateView(str, context, attributeSet);
if (onCreateView != null) {
return onCreateView;
}
}
return null;
}
示例6: m847a
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
static void m847a(LayoutInflater layoutInflater, al alVar) {
Factory2 ajVar = alVar != null ? new aj(alVar) : null;
layoutInflater.setFactory2(ajVar);
Factory factory = layoutInflater.getFactory();
if (factory instanceof Factory2) {
ai.m848a(layoutInflater, (Factory2) factory);
} else {
ai.m848a(layoutInflater, ajVar);
}
}
示例7: if
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
View callActivityOnCreateView$1fef4371(String paramString, Context paramContext, AttributeSet paramAttributeSet)
{
if ((this.mOriginalWindowCallback instanceof LayoutInflater.Factory))
{
View localView = ((LayoutInflater.Factory)this.mOriginalWindowCallback).onCreateView(paramString, paramContext, paramAttributeSet);
if (localView != null) {
return localView;
}
}
return null;
}
示例8: setFactory
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
public void setFactory(LayoutInflater paramLayoutInflater, LayoutInflaterFactory paramLayoutInflaterFactory)
{
if (paramLayoutInflaterFactory != null) {}
for (LayoutInflaterCompatHC.FactoryWrapperHC localFactoryWrapperHC = new LayoutInflaterCompatHC.FactoryWrapperHC(paramLayoutInflaterFactory);; localFactoryWrapperHC = null)
{
paramLayoutInflater.setFactory2(localFactoryWrapperHC);
LayoutInflater.Factory localFactory = paramLayoutInflater.getFactory();
if (!(localFactory instanceof LayoutInflater.Factory2)) {
break;
}
LayoutInflaterCompatHC.forceSetFactory2(paramLayoutInflater, (LayoutInflater.Factory2)localFactory);
return;
}
LayoutInflaterCompatHC.forceSetFactory2(paramLayoutInflater, localFactoryWrapperHC);
}
示例9: a
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
public void a(LayoutInflater paramLayoutInflater, mh parammh)
{
if (parammh != null) {}
for (mg localmg = new mg(parammh);; localmg = null)
{
paramLayoutInflater.setFactory2(localmg);
LayoutInflater.Factory localFactory = paramLayoutInflater.getFactory();
if (!(localFactory instanceof LayoutInflater.Factory2)) {
break;
}
aau.a(paramLayoutInflater, (LayoutInflater.Factory2)localFactory);
return;
}
aau.a(paramLayoutInflater, localmg);
}
示例10: m845a
import android.view.LayoutInflater.Factory; //导入依赖的package包/类
static al m845a(LayoutInflater layoutInflater) {
Factory factory = layoutInflater.getFactory();
return factory instanceof ah ? ((ah) factory).f430a : null;
}