当前位置: 首页>>代码示例>>Java>>正文


Java Factory类代码示例

本文整理汇总了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);
}
 
开发者ID:cantalou,项目名称:AndroidSkinChange,代码行数:27,代码来源:SkinManager.java

示例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;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:10,代码来源:AppCompatDelegateImplV7.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:LayoutInflaterCompatHC.java

示例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;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:LayoutInflaterCompatBase.java

示例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;
}
 
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:10,代码来源:ae.java

示例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);
    }
}
 
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:11,代码来源:ai.java

示例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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:12,代码来源:AppCompatDelegateImplV7.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:16,代码来源:LayoutInflaterCompat.java

示例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);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:16,代码来源:md.java

示例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;
}
 
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:5,代码来源:ag.java


注:本文中的android.view.LayoutInflater.Factory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。