TransitionInflater

public class TransitionInflater


This class inflates scenes and transitions from resource files.

Summary

Public methods

static @NonNull TransitionInflater
from(@NonNull Context context)

Obtains the TransitionInflater from the given context.

@Nullable Transition
inflateTransition(int resource)

Loads a Transition object from a resource

@Nullable TransitionManager
inflateTransitionManager(int resource, @NonNull ViewGroup sceneRoot)

Loads a TransitionManager object from a resource

Public methods

from

Added in 1.0.0
public static @NonNull TransitionInflater from(@NonNull Context context)

Obtains the TransitionInflater from the given context.

inflateTransition

Added in 1.0.0
public @Nullable Transition inflateTransition(int resource)

Loads a Transition object from a resource

Parameters
int resource

The resource id of the transition to load

Returns
@Nullable Transition

The loaded Transition object

Throws
android.content.res.Resources.NotFoundException

when the transition cannot be loaded

inflateTransitionManager

Added in 1.0.0
public @Nullable TransitionManager inflateTransitionManager(int resource, @NonNull ViewGroup sceneRoot)

Loads a TransitionManager object from a resource

Parameters
int resource

The resource id of the transition manager to load

Returns
@Nullable TransitionManager

The loaded TransitionManager object

Throws
android.content.res.Resources.NotFoundException

when the transition manager cannot be loaded