VisibilityPropagation


public abstract class VisibilityPropagation
extends TransitionPropagation

java.lang.Object
   ↳ android.transition.TransitionPropagation
     ↳ android.transition.VisibilityPropagation
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 TransitionPropagation that propagates based on the distance to the side and, orthogonally, the distance to epicenter. 


Base class for TransitionPropagations that care about View Visibility and the center position of the View.

Summary

Public constructors

VisibilityPropagation()

Public methods

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 captureValues(android.transition.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.

Inherited methods

abstract void captureValues(TransitionValues transitionValues)

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

abstract String[] getPropagationProperties()

Returns the set of property names stored in the TransitionValues object passed into captureValues(android.transition.TransitionValues) that this transition propagation cares about for the purposes of preventing duplicate capturing of property values.

abstract long getStartDelay(ViewGroup sceneRoot, Transition transition, TransitionValues startValues, TransitionValues endValues)

Called by Transition to alter the Animator start delay.

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

VisibilityPropagation

public VisibilityPropagation ()

Public methods

captureValues

Added in API level 21
public void captureValues (TransitionValues values)

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(android.view.ViewGroup, android.transition.Transition, android.transition.TransitionValues, android.transition.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 getStartDelay(android.view.ViewGroup, android.transition.Transition, android.transition.TransitionValues, android.transition.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.

Parameters
values TransitionValues: 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

Added in API level 21
public String[] getPropagationProperties ()

Returns the set of property names stored in the TransitionValues object passed into captureValues(android.transition.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

Returns
String[] An array of property names as described in the class documentation for TransitionValues.

getViewVisibility

Added in API level 21
public int getViewVisibility (TransitionValues values)

Returns View.getVisibility() for the View at the time the values were captured.

Parameters
values TransitionValues: The TransitionValues captured at the start or end of the Transition.

Returns
int View.getVisibility() for the View at the time the values were captured.

getViewX

Added in API level 21
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 TransitionValues: The TransitionValues captured at the start or end of the Transition.

Returns
int the View's center x coordinate, relative to the screen, at the time the values were captured.

getViewY

Added in API level 21
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 TransitionValues: The TransitionValues captured at the start or end of the Transition.

Returns
int the View's center y coordinate, relative to the screen, at the time the values were captured.