Java 类android.view.LayoutInflater.Factory 实例源码

项目:AndroidSkinChange    文件:SkinManager.java   
/**
 * 注册自定义的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);
}
项目:boohee_v5.6    文件:AppCompatDelegateImplV7.java   
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;
}
项目:boohee_v5.6    文件:LayoutInflaterCompatHC.java   
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);
    }
}
项目:boohee_v5.6    文件:LayoutInflaterCompatBase.java   
static LayoutInflaterFactory getFactory(LayoutInflater inflater) {
    Factory factory = inflater.getFactory();
    if (factory instanceof FactoryWrapper) {
        return ((FactoryWrapper) factory).mDelegateFactory;
    }
    return null;
}
项目:solved-hacking-problem    文件:ae.java   
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;
}
项目:solved-hacking-problem    文件:ai.java   
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);
    }
}
项目:solved-hacking-problem    文件:ae.java   
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;
}
项目:solved-hacking-problem    文件:ai.java   
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);
    }
}
项目:FMTech    文件:AppCompatDelegateImplV7.java   
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;
}
项目:FMTech    文件:LayoutInflaterCompat.java   
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);
}
项目:FMTech    文件:md.java   
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);
}
项目:solved-hacking-problem    文件:ag.java   
static al m845a(LayoutInflater layoutInflater) {
    Factory factory = layoutInflater.getFactory();
    return factory instanceof ah ? ((ah) factory).f430a : null;
}
项目:solved-hacking-problem    文件:ag.java   
static al m845a(LayoutInflater layoutInflater) {
    Factory factory = layoutInflater.getFactory();
    return factory instanceof ah ? ((ah) factory).f430a : null;
}