Most visited

Recently visited

Added in API level 21

VisibilityPropagation

public abstract class VisibilityPropagation
extends TransitionPropagation

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


基本类 TransitionPropagation s关心视图可见性和视图的中心位置。

Summary

Public constructors

VisibilityPropagation()

Public methods

void captureValues(TransitionValues values)

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

String[] getPropagationProperties()

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

int getViewVisibility(TransitionValues values)

在捕获值时返回视图的 getVisibility()

int getViewX(TransitionValues values)

在捕获值的同时,返回相对于屏幕的视图的中心x坐标。

int getViewY(TransitionValues values)

在捕获值的同时,返回相对于屏幕的视图的中心y坐标。

Inherited methods

From class android.transition.TransitionPropagation
From class java.lang.Object

Public constructors

VisibilityPropagation

Added in API level 21
VisibilityPropagation ()

Public methods

captureValues

Added in API level 21
void captureValues (TransitionValues values)

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

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

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

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

TransitionPropagation必须重写此方法以防止重复捕获值,并且必须至少包含一个值

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

getViewVisibility

Added in API level 21
int getViewVisibility (TransitionValues values)

在捕获值时返回视图的 getVisibility()

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

getViewX

Added in API level 21
int getViewX (TransitionValues values)

在捕获值的同时,返回相对于屏幕的视图的中心x坐标。

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
int getViewY (TransitionValues values)

在捕获值的同时,返回相对于屏幕的视图的中心y坐标。

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.

Hooray!