AutoTransition


public class AutoTransition
extends TransitionSet

java.lang.Object
   ↳ android.transition.Transition
     ↳ android.transition.TransitionSet
       ↳ android.transition.AutoTransition


Utility class for creating a default transition that automatically fades, moves, and resizes views during a scene change.

An AutoTransition can be described in a resource file by using the tag autoTransition, along with the other standard attributes of R.styleable.Transition.

Summary

Inherited XML attributes

android:duration Amount of time (in milliseconds) that the transition should run. 
android:interpolator Interpolator to be used in the animations spawned by this transition. 
android:startDelay Delay in milliseconds before the transition starts. 

Inherited constants

int ORDERING_SEQUENTIAL

A flag used to indicate that the child transitions of this set should play in sequence; when one child transition ends, the next child transition begins.

int ORDERING_TOGETHER

A flag used to indicate that the child transitions of this set should all start at the same time.

int MATCH_ID

With setMatchOrder(int), chooses to match by View.getId().

int MATCH_INSTANCE

With setMatchOrder(int), chooses to match by View instance.

int MATCH_ITEM_ID

With setMatchOrder(int), chooses to match by the Adapter item id.

int MATCH_NAME

With setMatchOrder(int), chooses to match by View.getTransitionName().

Public constructors

AutoTransition()

Constructs an AutoTransition object, which is a TransitionSet which first fades out disappearing targets, then moves and resizes existing targets, and finally fades in appearing targets.

AutoTransition(Context context, AttributeSet attrs)

Inherited methods

TransitionSet addListener(Transition.TransitionListener listener)

Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

TransitionSet addTarget(View target)

Sets the target view instances that this Transition is interested in animating.

TransitionSet addTarget(int targetId)

Adds the id of a target view that this Transition is interested in animating.

TransitionSet addTarget(Class<T> targetType)

Adds the Class of a target view that this Transition is interested in animating.

TransitionSet addTarget(String targetName)

Adds the transitionName of a target view that this Transition is interested in animating.

TransitionSet addTransition(Transition transition)

Adds child transition to this set.

void captureEndValues(TransitionValues transitionValues)

Captures the values in the end scene for the properties that this transition monitors.

void captureStartValues(TransitionValues transitionValues)

Captures the values in the start scene for the properties that this transition monitors.

TransitionSet clone()

Creates and returns a copy of this object.

Transition excludeTarget(View target, boolean exclude)

Whether to add the given target to the list of targets to exclude from this transition.

Transition excludeTarget(Class<T> type, boolean exclude)

Whether to add the given type to the list of types to exclude from this transition.

Transition excludeTarget(String targetName, boolean exclude)

Whether to add the given transitionName to the list of target transitionNames to exclude from this transition.

Transition excludeTarget(int targetId, boolean exclude)

Whether to add the given id to the list of target ids to exclude from this transition.

int getOrdering()

Returns the ordering of this TransitionSet.

Transition getTransitionAt(int index)

Returns the child Transition at the specified position in the TransitionSet.

int getTransitionCount()

Returns the number of child transitions in the TransitionSet.

TransitionSet removeListener(Transition.TransitionListener listener)

Removes a listener from the set listening to this animation.

TransitionSet removeTarget(int targetId)

Removes the given targetId from the list of ids that this Transition is interested in animating.

TransitionSet removeTarget(View target)

Removes the given target from the list of targets that this Transition is interested in animating.

TransitionSet removeTarget(String target)

Removes the given targetName from the list of transitionNames that this Transition is interested in animating.

TransitionSet removeTarget(Class<T> target)

Removes the given target from the list of targets that this Transition is interested in animating.

TransitionSet removeTransition(Transition transition)

Removes the specified child transition from this set.

TransitionSet setDuration(long duration)

Setting a non-negative duration on a TransitionSet causes all of the child transitions (current and future) to inherit this duration.

void setEpicenterCallback(Transition.EpicenterCallback epicenterCallback)

Sets the callback to use to find the epicenter of a Transition.

TransitionSet setInterpolator(TimeInterpolator interpolator)

Sets the interpolator of this transition.

TransitionSet setOrdering(int ordering)

Sets the play order of this set's child transitions.

void setPathMotion(PathMotion pathMotion)

Sets the algorithm used to calculate two-dimensional interpolation.

void setPropagation(TransitionPropagation propagation)

Sets the method for determining Animator start delays.

TransitionSet setStartDelay(long startDelay)

Sets the startDelay of this transition.

Transition addListener(Transition.TransitionListener listener)

Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

Transition addTarget(View target)

Sets the target view instances that this Transition is interested in animating.

Transition addTarget(int targetId)

Adds the id of a target view that this Transition is interested in animating.

Transition addTarget(Class<T> targetType)

Adds the Class of a target view that this Transition is interested in animating.

Transition addTarget(String targetName)

Adds the transitionName of a target view that this Transition is interested in animating.

boolean canRemoveViews()
abstract void captureEndValues(TransitionValues transitionValues)

Captures the values in the end scene for the properties that this transition monitors.

abstract void captureStartValues(TransitionValues transitionValues)

Captures the values in the start scene for the properties that this transition monitors.

Transition clone()

Creates and returns a copy of this object.

Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues)

This method creates an animation that will be run for this transition given the information in the startValues and endValues structures captured earlier for the start and end scenes.

Transition excludeChildren(int targetId, boolean exclude)

Whether to add the children of the given id to the list of targets to exclude from this transition.

Transition excludeChildren(Class<T> type, boolean exclude)

Whether to add the given type to the list of types whose children should be excluded from this transition.

Transition excludeChildren(View target, boolean exclude)

Whether to add the children of given target to the list of target children to exclude from this transition.

Transition excludeTarget(View target, boolean exclude)

Whether to add the given target to the list of targets to exclude from this transition.

Transition excludeTarget(Class<T> type, boolean exclude)

Whether to add the given type to the list of types to exclude from this transition.

Transition excludeTarget(String targetName, boolean exclude)

Whether to add the given transitionName to the list of target transitionNames to exclude from this transition.

Transition excludeTarget(int targetId, boolean exclude)

Whether to add the given id to the list of target ids to exclude from this transition.

long getDuration()

Returns the duration set on this transition.

Rect getEpicenter()

Returns the epicenter as specified by the Transition.EpicenterCallback or null if no callback exists.

Transition.EpicenterCallback getEpicenterCallback()

Returns the callback used to find the epicenter of the Transition.

TimeInterpolator getInterpolator()

Returns the interpolator set on this transition.

String getName()

Returns the name of this Transition.

PathMotion getPathMotion()

Returns the algorithm object used to interpolate along two dimensions.

TransitionPropagation getPropagation()

Returns the TransitionPropagation used to calculate Animator start delays.

long getStartDelay()

Returns the startDelay set on this transition.

List<Integer> getTargetIds()

Returns the list of target IDs that this transition limits itself to tracking and animating.

List<String> getTargetNames()

Returns the list of target transitionNames that this transition limits itself to tracking and animating.

List<Class<T>> getTargetTypes()

Returns the list of target transitionNames that this transition limits itself to tracking and animating.

List<View> getTargets()

Returns the list of target views that this transition limits itself to tracking and animating.

String[] getTransitionProperties()

Returns the set of property names used stored in the TransitionValues object passed into captureStartValues(android.transition.TransitionValues) that this transition cares about for the purposes of canceling overlapping animations.

TransitionValues getTransitionValues(View view, boolean start)

This method can be called by transitions to get the TransitionValues for any particular view during the transition-playing process.

boolean isTransitionRequired(TransitionValues startValues, TransitionValues endValues)

Returns whether or not the transition should create an Animator, based on the values captured during captureStartValues(android.transition.TransitionValues) and captureEndValues(android.transition.TransitionValues).

Transition removeListener(Transition.TransitionListener listener)

Removes a listener from the set listening to this animation.

Transition removeTarget(int targetId)

Removes the given targetId from the list of ids that this Transition is interested in animating.

Transition removeTarget(View target)

Removes the given target from the list of targets that this Transition is interested in animating.

Transition removeTarget(String targetName)

Removes the given targetName from the list of transitionNames that this Transition is interested in animating.

Transition removeTarget(Class<T> target)

Removes the given target from the list of targets that this Transition is interested in animating.

Transition setDuration(long duration)

Sets the duration of this transition.

void setEpicenterCallback(Transition.EpicenterCallback epicenterCallback)

Sets the callback to use to find the epicenter of a Transition.

Transition setInterpolator(TimeInterpolator interpolator)

Sets the interpolator of this transition.

void setMatchOrder(int... matches)

Sets the order in which Transition matches View start and end values.

void setPathMotion(PathMotion pathMotion)

Sets the algorithm used to calculate two-dimensional interpolation.

void setPropagation(TransitionPropagation transitionPropagation)

Sets the method for determining Animator start delays.

Transition setStartDelay(long startDelay)

Sets the startDelay of this transition.

String toString()

Returns a string representation of the object.

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

AutoTransition

Added in API level 19
public AutoTransition ()

Constructs an AutoTransition object, which is a TransitionSet which first fades out disappearing targets, then moves and resizes existing targets, and finally fades in appearing targets.

AutoTransition

Added in API level 21
public AutoTransition (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet