LayoutInflaterCompat

public final class LayoutInflaterCompat


Helper for accessing features in LayoutInflater.

Summary

Public constructors

Public methods

static LayoutInflaterFactory

This method is deprecated.

Use setFactory2 to set and getFactory2 to get the factory.

static void
setFactory(
    @NonNull LayoutInflater inflater,
    @NonNull LayoutInflaterFactory factory
)

This method is deprecated.

Use setFactory2 instead to set and getFactory2 to get the factory.

static void
setFactory2(
    @NonNull LayoutInflater inflater,
    @NonNull LayoutInflater.Factory2 factory
)

Attach a custom LayoutInflater.Factory2 for creating views while using this LayoutInflater.

Public constructors

LayoutInflaterCompat

public final LayoutInflaterCompat()

Public methods

getFactory

public static LayoutInflaterFactory getFactory(LayoutInflater inflater)

Return the current LayoutInflaterFactory (or null). This is called on each element name. If the factory returns a View, add that to the hierarchy. If it returns null, proceed to call onCreateView(name).

Returns
LayoutInflaterFactory

The LayoutInflaterFactory associated with the LayoutInflater. Will be null if the inflater does not have a LayoutInflaterFactory but a raw LayoutInflater.Factory.

See also
getFactory

setFactory

public static void setFactory(
    @NonNull LayoutInflater inflater,
    @NonNull LayoutInflaterFactory factory
)