Google is committed to advancing racial equity for Black communities. See how.

ChangeImageTransform

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

This Transition captures an ImageView's matrix before and after the scene change and animates it during the transition.

In combination with ChangeBounds, ChangeImageTransform allows ImageViews that change size, shape, or android.widget.ImageView.ScaleType to animate contents smoothly.

Summary

Inherited constants

Public constructors

<init>(@NonNull context: Context, @NonNull attrs: AttributeSet)

Public methods

open Unit
captureEndValues(@NonNull transitionValues: TransitionValues)

open Unit
captureStartValues(@NonNull transitionValues: TransitionValues)

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

Creates an Animator for ImageViews moving, changing dimensions, and/or changing android.widget.ImageView.ScaleType.

open Array<String!>

Inherited functions

Public constructors

<init>

ChangeImageTransform()

<init>

ChangeImageTransform(
    @NonNull context: Context,
    @NonNull attrs: AttributeSet)

Public methods

captureEndValues

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

captureStartValues

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

createAnimator

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

Creates an Animator for ImageViews moving, changing dimensions, and/or changing android.widget.ImageView.ScaleType.

Parameters
sceneRoot ViewGroup: The root of the transition hierarchy.
startValues TransitionValues?: The values for a specific target in the start scene.
endValues TransitionValues?: The values for the target in the end scene.
Return
Animator? An Animator to move an ImageView or null if the View is not an ImageView, the Drawable changed, the View is not VISIBLE, or there was no change.

getTransitionProperties

@NonNull open fun getTransitionProperties(): Array<String!>