ChangeTransform

open class ChangeTransform : Transition
kotlin.Any
   ↳ androidx.transition.Transition
   ↳ androidx.transition.ChangeTransform

This Transition captures scale and rotation for Views before and after the scene change and animates those changes during the transition. A change in parent is handled as well by capturing the transforms from the parent before and after the scene change and animating those during the transition.

Summary

Inherited constants
Public constructors

<init>(context: Context!, attrs: AttributeSet!)

Public methods
open Unit
setReparent(reparent: Boolean)

Sets whether parent changes will be tracked by the ChangeTransform.

open Animator?
createAnimator(@NonNull sceneRoot: ViewGroup, startValues: TransitionValues?, endValues: TransitionValues?)

open Array<String!>?

open Unit
captureStartValues(@NonNull transitionValues: TransitionValues)

open Unit
setReparentWithOverlay(reparentWithOverlay: Boolean)

Sets whether changes to parent should use an overlay or not.

open Boolean

Returns whether parent changes will be tracked by the ChangeTransform.

open Boolean

Returns whether changes to parent should use an overlay or not.

open Unit
captureEndValues(@NonNull transitionValues: TransitionValues)

Inherited functions

Public constructors

<init>

ChangeTransform()

<init>

ChangeTransform(context: Context!, attrs: AttributeSet!)

Public methods

setReparent

open fun setReparent(reparent: Boolean): Unit

Sets whether parent changes will be tracked by the ChangeTransform. If parent changes are tracked, then the transform will adjust to the transforms of the different parents. If they aren't tracked, only the transforms of the transitioning view will be tracked. Default is true.

Parameters
reparent Boolean: Set to true to track parent changes or false to only track changes of the transitioning view without considering the parent change.

createAnimator

open fun createAnimator(@NonNull sceneRoot: ViewGroup, startValues: TransitionValues?, endValues: TransitionValues?): Animator?

getTransitionProperties

open fun getTransitionProperties(): Array<String!>?

captureStartValues

open fun captureStartValues(@NonNull transitionValues: TransitionValues): Unit

setReparentWithOverlay

open fun setReparentWithOverlay(reparentWithOverlay: Boolean): Unit

Sets whether changes to parent should use an overlay or not. When the parent change doesn't use an overlay, it affects the transforms of the child. The default value is true.

Note: when Overlays are not used when a parent changes, a view can be clipped when it moves outside the bounds of its parent. Setting android.view.ViewGroup#setClipChildren(boolean) and android.view.ViewGroup#setClipToPadding(boolean) can help. Also, when Overlays are not used and the parent is animating its location, the position of the child view will be relative to its parent's final position, so it may appear to "jump" at the beginning.

Parameters
reparentWithOverlay Boolean: true when a changed parent should execute the transition inside the scene root's overlay or false if a parent change only affects the transform of the transitioning view.

getReparent

open fun getReparent(): Boolean

Returns whether parent changes will be tracked by the ChangeTransform. If parent changes are tracked, then the transform will adjust to the transforms of the different parents. If they aren't tracked, only the transforms of the transitioning view will be tracked. Default is true.

Return
Boolean: whether parent changes will be tracked by the ChangeTransform.

getReparentWithOverlay

open fun getReparentWithOverlay(): Boolean

Returns whether changes to parent should use an overlay or not. When the parent change doesn't use an overlay, it affects the transforms of the child. The default value is true.

Note: when Overlays are not used when a parent changes, a view can be clipped when it moves outside the bounds of its parent. Setting android.view.ViewGroup#setClipChildren(boolean) and android.view.ViewGroup#setClipToPadding(boolean) can help. Also, when Overlays are not used and the parent is animating its location, the position of the child view will be relative to its parent's final position, so it may appear to "jump" at the beginning.

Return
Boolean: true when a changed parent should execute the transition inside the scene root's overlay or false if a parent change only affects the transform of the transitioning view.

captureEndValues

open fun captureEndValues(@NonNull transitionValues: TransitionValues): Unit