LayoutInflaterCompat

Added in 1.1.0

public final class LayoutInflaterCompat


Helper for accessing features in LayoutInflater.

Summary

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 methods

getFactory

Added in 1.1.0
Deprecated in 1.1.0
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

Added in 1.1.0
Deprecated in 1.1.0
public static void setFactory(
    @NonNull LayoutInflater inflater,
    @NonNull LayoutInflaterFactory factory
)

Attach a custom Factory interface for creating views while using this LayoutInflater. This must not be null, and can only be set once; after setting, you can not change the factory.

See also
setFactory

setFactory2

Added in 1.1.0
public static void setFactory2(
    @NonNull LayoutInflater inflater,
    @NonNull LayoutInflater.Factory2 factory
)

Attach a custom LayoutInflater.Factory2 for creating views while using this LayoutInflater. This must not be null, and can only be set once; after setting, you can not change the factory.

See also
setFactory2