LayoutInflaterFactory2
LayoutInflaterFactory2 is an interface in the Android framework that extends LayoutInflaterFactory. It provides an additional callback method, onCreateView(View parent, String name, Context context, AttributeSet attrs), which offers more context about the view being created. This interface is primarily used by the LayoutInflater to delegate the creation of Views to a custom factory before the default Android view creation logic is invoked.
When the Android system needs to inflate a layout XML file into View objects, it uses an
If the custom factory's onCreateView method returns a non-null View, the LayoutInflater uses that View and skips