TransitionPropagation
abstract class TransitionPropagation
VisibilityPropagation |
Base class for |
CircularPropagation |
A propagation that varies with the distance to the epicenter of the Transition or center of the scene if no epicenter exists. |
SidePropagation |
A |
Extend TransitionPropagation to customize start delays for Animators created in createAnimator. A Transition such as Explode defaults to using CircularPropagation and Views closer to the epicenter will move out of the scene later and into the scene sooner than Views farther from the epicenter, giving the appearance of inertia. With no TransitionPropagation, all Views will react simultaneously to the start of the transition.
| See also | |
|---|---|
setPropagation |
|
getEpicenter |
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
abstract Unit |
captureValues(transitionValues: TransitionValues)Captures the values in the start or end scene for the properties that this transition propagation monitors. |
abstract Array<String!>? |
Returns the set of property names stored in the |
abstract Long |
getStartDelay(Called by Transition to alter the Animator start delay. |
Public constructors
Public functions
captureValues
abstract fun captureValues(transitionValues: TransitionValues): Unit
Captures the values in the start or end scene for the properties that this transition propagation monitors. These values are then passed as the startValues or endValues structure in a later call to getStartDelay. The main concern for an implementation is what the properties are that the transition cares about and what the values are for all of those properties. The start and end values will be compared later during the getStartDelay. method to determine the start delay.
Subclasses must implement this method. The method should only be called by the transition system; it is not intended to be called from external classes.
| Parameters | |
|---|---|
transitionValues: TransitionValues |
The holder for any values that the Transition wishes to store. Values are stored in the |
getPropagationProperties
abstract fun getPropagationProperties(): Array<String!>?
Returns the set of property names stored in the TransitionValues object passed into captureValues that this transition propagation cares about for the purposes of preventing duplicate capturing of property values.
A TransitionPropagation must override this method to prevent duplicate capturing of values and must contain at least one
| Returns | |
|---|---|
Array<String!>? |
An array of property names as described in the class documentation for |
getStartDelay
abstract fun getStartDelay(
sceneRoot: ViewGroup,
transition: Transition,
startValues: TransitionValues?,
endValues: TransitionValues?
): Long
Called by Transition to alter the Animator start delay. All start delays will be adjusted such that the minimum becomes zero.
| Parameters | |
|---|---|
sceneRoot: ViewGroup |
The root of the View hierarchy running the transition. |
transition: Transition |
The transition that created the Animator |
startValues: TransitionValues? |
The values for a specific target in the start scene. |
endValues: TransitionValues? |
The values for the target in the end scene. |
| Returns | |
|---|---|
Long |
A start delay to use with the Animator created by |