Package icyllis.modernui.transition

# Class VisibilityPropagation

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

Direct Known Subclasses:
  `CircularPropagation`, `SidePropagation`

public abstract class VisibilityPropagation extends TransitionPropagation
Base class for `TransitionPropagation`s that care about View Visibility and the center position of the View.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VisibilityPropagation()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `captureValues(TransitionValues values)`
  Captures the values in the start or end scene for the properties that this transition propagation monitors.
  `String[]`
  `getPropagationProperties()`
  Returns the set of property names stored in the `TransitionValues` object passed into `TransitionPropagation.captureValues(TransitionValues)` that this transition propagation cares about for the purposes of preventing duplicate capturing of property values.
  `int`
  `getViewVisibility(TransitionValues values)`
  Returns `View.getVisibility()` for the View at the time the values were captured.
  `int`
  `getViewX(TransitionValues values)`
  Returns the View's center x coordinate, relative to the screen, at the time the values were captured.
  `int`
  `getViewY(TransitionValues values)`
  Returns the View's center y coordinate, relative to the screen, at the time the values were captured.

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

  `getStartDelay`

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

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

- ## Constructor Details

  - ### VisibilityPropagation

    public VisibilityPropagation()

- ## Method Details

  - ### captureValues

    public void captureValues(@Nonnull TransitionValues values)
    Description copied from class: `TransitionPropagation`
    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 `TransitionPropagation.getStartDelay(ViewGroup, Transition, TransitionValues, TransitionValues)`. 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 `TransitionPropagation.getStartDelay(ViewGroup, Transition, TransitionValues, TransitionValues)`. 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.

    Specified by:
      `captureValues` in class `TransitionPropagation`
    Parameters:
      `values` - The holder for any values that the Transition wishes to store. Values are stored in the `values` field of this TransitionValues object and are keyed from a String value. For example, to store a view's rotation value, a transition might call `transitionValues.values.put("appname:transitionname:rotation", view.getRotation())`. The target view will already be stored in the transitionValues structure when this method is called.

  - ### getPropagationProperties

    public String[] getPropagationProperties()
    Description copied from class: `TransitionPropagation`
    Returns the set of property names stored in the `TransitionValues` object passed into `TransitionPropagation.captureValues(TransitionValues)` 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

    Specified by:
      `getPropagationProperties` in class `TransitionPropagation`
    Returns:
      An array of property names as described in the class documentation for `TransitionValues`.

  - ### getViewVisibility

    public int getViewVisibility(TransitionValues values)
    Returns `View.getVisibility()` for the View at the time the values were captured.
    Parameters:
      `values` - The TransitionValues captured at the start or end of the Transition.
    Returns:
      `View.getVisibility()` for the View at the time the values were captured.

  - ### getViewX

    public int getViewX(TransitionValues values)
    Returns the View's center x coordinate, relative to the screen, at the time the values were captured.
    Parameters:
      `values` - The TransitionValues captured at the start or end of the Transition.
    Returns:
      the View's center x coordinate, relative to the screen, at the time the values were captured.

  - ### getViewY

    public int getViewY(TransitionValues values)
    Returns the View's center y coordinate, relative to the screen, at the time the values were captured.
    Parameters:
      `values` - The TransitionValues captured at the start or end of the Transition.
    Returns:
      the View's center y coordinate, relative to the screen, at the time the values were captured.