public abstract class Transition extends Object
TODO(t20719329): Better documentation for Transition class
Note: This abstract class has no instance methods, abstract or otherwise. It's a marker class
so that TransitionSet
s and Transition.TransitionUnit
s can be composed with each other. It's
abstract because before Java 8, static methods on interfaces are not allowed.
Modifier and Type | Class and Description |
---|---|
static class |
Transition.AnimationTarget
Specifies what components and properties a Transition should target.
|
static class |
Transition.AutoBoundsTransitionBuilder
Transition builder that targets every component in the component tree whose bounds have been
changed.
|
static class |
Transition.BaseTransitionUnitsBuilder |
static class |
Transition.ComponentTarget
Specifies the component(s) a Transition should target.
|
static class |
Transition.PropertyTarget
Specifies the property(s) a Transition should target.
|
static class |
Transition.SpringTransitionAnimator
Creates spring-driven animations.
|
static class |
Transition.TimingTransitionAnimator
Creates timing-driven animations with the given duration.
|
static interface |
Transition.TransitionAnimator
Class that knows how to create a
TransitionAnimationBinding given a PropertyAnimation . |
static class |
Transition.TransitionKeyType |
static class |
Transition.TransitionUnit |
static class |
Transition.TransitionUnitsBuilder
Transition builder that allows targeting arbitrary keys and properties.
|
Modifier and Type | Field and Description |
---|---|
static Transition.TransitionAnimator |
SPRING_WITH_OVERSHOOT
Spring-driven animator with values of
SpringConfig.DEFAULT_TENSION and SpringConfig.DEFAULT_FRICTION that has overshooting behavior. |
static Transition.TransitionAnimator |
SPRING_WITHOUT_OVERSHOOT
Spring-driven animator that can be used as alternative to
SPRING_WITH_OVERSHOOT if
overshoot is not desired. |
Constructor and Description |
---|
Transition() |
Modifier and Type | Method and Description |
---|---|
static Transition.AutoBoundsTransitionBuilder |
allLayout()
Creates an Automatic Bounds Transition that targets every component in the component tree whose
bounds have been changed.
|
static Transition.TransitionUnitsBuilder |
create(String... keys)
Creates a Transition for the components with the given transition keys.
|
static Transition.TransitionUnitsBuilder |
create(String key)
Creates a Transition for the component with the given transition key.
|
static Transition.TransitionUnitsBuilder |
create(Transition.ComponentTarget target)
Creates a Transition for the components targeted by the given
Transition.ComponentTarget . |
static Transition.TransitionUnitsBuilder |
create(Transition.TransitionKeyType type,
String... keys)
Creates a Transition for the components with the given transition keys of the given type.
|
static Transition.TransitionUnitsBuilder |
create(Transition.TransitionKeyType type,
String key)
Creates a Transition for the component with the given transition key of the given type.
|
static <T extends Transition> |
delay(int delayMs,
T transition)
Creates a delayed
Transition s that will run after a delay. |
static <T extends Transition> |
parallel(T... transitions)
Creates a set of
Transition s that will run in parallel. |
static <T extends Transition> |
sequence(T... transitions)
Creates a sequence of
Transition s that will run one after another. |
static Transition.TransitionAnimator |
springWithConfig(double tension,
double friction)
Creates a
SpringTransition with the given tension and friction. |
static <T extends Transition> |
stagger(int staggerMs,
T... transitions)
Creates a set of
Transition s that will run in parallel but starting on a stagger. |
static Transition.TransitionAnimator |
timing(int durationMs)
Creates a
TimingTransition with the given duration. |
static Transition.TransitionAnimator |
timing(int durationMs,
Interpolator interpolator)
Creates a
TimingTransition with the given duration and Interpolator . |
public static final Transition.TransitionAnimator SPRING_WITH_OVERSHOOT
SpringConfig.DEFAULT_TENSION
and SpringConfig.DEFAULT_FRICTION
that has overshooting behavior. Spring physics implementation is
taken from Rebound library and we recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public static final Transition.TransitionAnimator SPRING_WITHOUT_OVERSHOOT
SPRING_WITH_OVERSHOOT
if
overshoot is not desired. Spring physics implementation is taken from Rebound library and we
recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public static Transition.TransitionUnitsBuilder create(String key)
public static Transition.TransitionUnitsBuilder create(String... keys)
public static Transition.TransitionUnitsBuilder create(Transition.TransitionKeyType type, String key)
public static Transition.TransitionUnitsBuilder create(Transition.TransitionKeyType type, String... keys)
public static Transition.TransitionUnitsBuilder create(Transition.ComponentTarget target)
Transition.ComponentTarget
.public static Transition.AutoBoundsTransitionBuilder allLayout()
public static <T extends Transition> TransitionSet parallel(T... transitions)
Transition
s that will run in parallel.public static <T extends Transition> TransitionSet stagger(int staggerMs, T... transitions)
Transition
s that will run in parallel but starting on a stagger.public static <T extends Transition> TransitionSet sequence(T... transitions)
Transition
s that will run one after another.public static <T extends Transition> Transition delay(int delayMs, T transition)
Transition
s that will run after a delay.public static Transition.TransitionAnimator springWithConfig(double tension, double friction)
SpringTransition
with the given tension and friction. Spring physics
implementation is taken from Rebound library and we recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public static Transition.TransitionAnimator timing(int durationMs)
TimingTransition
with the given duration.public static Transition.TransitionAnimator timing(int durationMs, Interpolator interpolator)
TimingTransition
with the given duration and Interpolator
.