Java Code Examples for android.view.LayoutInflater.setFactory2()

The following are Jave code examples for showing how to use setFactory2() of the android.view.LayoutInflater class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: boohee_v5.6   File: LayoutInflaterCompatHC.java   Source Code and License Vote up 5 votes
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);
    }
}
 
Example 2
Project: boohee_v5.6   File: LayoutInflaterCompatLollipop.java   Source Code and License Vote up 4 votes
static void setFactory(LayoutInflater inflater, LayoutInflaterFactory factory) {
    inflater.setFactory2(factory != null ? new FactoryWrapperHC(factory) : null);
}