Most visited

Recently visited

Added in API level 21

TransitionPropagation

public abstract class TransitionPropagation
extends Object

java.lang.Object
   ↳ android.transition.TransitionPropagation
Known Direct Subclasses
Known Indirect Subclasses


扩展TransitionPropagation以自定义在createAnimator(ViewGroup, TransitionValues, TransitionValues)创建的动画师的开始延迟。 诸如Explode的过渡默认使用CircularPropagation ,距离震中较近的视图将稍后离开场景并进入场景,而远离震源远离震中,从而出现惯性现象。 在没有TransitionPropagation的情况下,所有视图将同时对转换的开始作出反应。

也可以看看:

Summary

Public constructors

TransitionPropagation()

Public methods

abstract void captureValues(TransitionValues transitionValues)

捕获开始或结束场景中的值,用于此转场传播监视的属性。

abstract String[] getPropagationProperties()

返回存储在传递到 captureValues(TransitionValues)中的 TransitionValues对象中存储的属性名称 captureValues(TransitionValues) ,该转换传播关心的目的是防止重复捕获属性值。

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

由Transition调用以改变Animator启动延迟。

Inherited methods

From class java.lang.Object

Public constructors

TransitionPropagation

Added in API level 21
TransitionPropagation ()

Public methods

captureValues

Added in API level 21
void captureValues (TransitionValues transitionValues)

捕获开始或结束场景中的值,用于此转场传播监视的属性。 这些值随后将作为startValues或endValues结构传递给getStartDelay(ViewGroup, Transition, TransitionValues, TransitionValues) 实施的主要关注点是过渡期关注的属性以及所有这些属性的价值。 开始和结束值将在getStartDelay(ViewGroup, Transition, TransitionValues, TransitionValues)后期进行比较。 方法来确定启动延迟。

子类必须实现此方法。 该方法只能由过渡系统调用; 它不打算从外部类中调用。

Parameters
transitionValues 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
String[] getPropagationProperties ()

返回传递到 captureValues(TransitionValues)TransitionValues对象中存储的属性名称 captureValues(TransitionValues) ,该转换传播关心的目的是防止重复捕获属性值。

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.

getStartDelay

Added in API level 21
long getStartDelay (ViewGroup sceneRoot, 
                Transition transition, 
                TransitionValues startValues, 
                TransitionValues endValues)

由Transition调用以改变Animator启动延迟。 所有启动延迟将被调整,使得最小值变为零。

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 transition. The delay will be offset by the minimum delay of all TransitionPropagations used in the Transition so that the smallest delay will be 0. Returned values may be negative.

Hooray!