Package icyllis.modernui.transition

# Class CircularPropagation

java.lang.Object
icyllis.modernui.transition.TransitionPropagation
icyllis.modernui.transition.VisibilityPropagation
icyllis.modernui.transition.CircularPropagation

public class CircularPropagation extends VisibilityPropagation
A propagation that varies with the distance to the epicenter of the Transition or center of the scene if no epicenter exists. When a View is visible in the start of the transition, Views farther from the epicenter will transition sooner than Views closer to the epicenter. When a View is not in the start of the transition or is not visible at the start of the transition, it will transition sooner when closer to the epicenter and later when farther from the epicenter. This is the default TransitionPropagation used with `Explode`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CircularPropagation()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getStartDelay(ViewGroup sceneRoot, Transition transition, TransitionValues startValues, TransitionValues endValues)`
  Called by Transition to alter the Animator start delay.
  `void`
  `setPropagationSpeed(float propagationSpeed)`
  Sets the speed at which transition propagation happens, relative to the duration of the Transition.

  ### Methods inherited from class icyllis.modernui.transition.VisibilityPropagation

  `captureValues, getPropagationProperties, getViewVisibility, getViewX, getViewY`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CircularPropagation

    public CircularPropagation()

- ## Method Details

  - ### setPropagationSpeed

    public void setPropagationSpeed(float propagationSpeed)
    Sets the speed at which transition propagation happens, relative to the duration of the Transition. A `propagationSpeed` of 1 means that a View centered farthest from the epicenter and View centered at the epicenter will have a difference in start delay of approximately the duration of the Transition. A speed of 2 means the start delay difference will be approximately half of the duration of the transition. A value of 0 is illegal, but negative values will invert the propagation.
    Parameters:
      `propagationSpeed` - The speed at which propagation occurs, relative to the duration of the transition. A speed of 4 means it works 4 times as fast as the duration of the transition. May not be 0.

  - ### getStartDelay

    public long getStartDelay(@Nonnull ViewGroup sceneRoot, @Nonnull Transition transition, @Nullable TransitionValues startValues, @Nullable TransitionValues endValues)
    Description copied from class: `TransitionPropagation`
    Called by Transition to alter the Animator start delay. All start delays will be adjusted such that the minimum becomes zero.
    Specified by:
      `getStartDelay` in class `TransitionPropagation`
    Parameters:
      `sceneRoot` - The root of the View hierarchy running the transition.
      `transition` - The transition that created the Animator
      `startValues` - The values for a specific target in the start scene.
      `endValues` - The values for the target in the end scene.
    Returns:
      A start delay to use with the Animator created by `transition`. The delay will be offset by the minimum delay of all `TransitionPropagation`s used in the Transition so that the smallest delay will be 0. Returned values may be negative.