The Android Developer Challenge is back! Submit your idea before December 2.

ChangeBounds

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

This transition captures the layout bounds of target views before and after the scene change and animates those changes during the transition.

A ChangeBounds transition can be described in a resource file by using the tag changeBounds, along with the other standard attributes of Transition.

Summary

Inherited constants

Public constructors

<init>(context: Context!, 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?)

open Boolean

Returns true when the ChangeBounds will resize by changing the clip bounds during the view animation or false when bounds are changed.

open Array<String!>?

open Unit
setResizeClip(resizeClip: Boolean)

When resizeClip is true, ChangeBounds resizes the view using the clipBounds instead of changing the dimensions of the view during the animation.

Inherited functions

Public constructors

<init>

ChangeBounds()

<init>

ChangeBounds(context: Context!, 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?

getResizeClip

open fun getResizeClip(): Boolean

Returns true when the ChangeBounds will resize by changing the clip bounds during the view animation or false when bounds are changed. The default value is false.

Return
Boolean: true when the ChangeBounds will resize by changing the clip bounds during the view animation or false when bounds are changed. The default value is false.

getTransitionProperties

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

setResizeClip

open fun setResizeClip(resizeClip: Boolean): Unit

When resizeClip is true, ChangeBounds resizes the view using the clipBounds instead of changing the dimensions of the view during the animation. When resizeClip is false, ChangeBounds resizes the View by changing its dimensions.

When resizeClip is set to true, the clip bounds is modified by ChangeBounds. Therefore, android.transition.ChangeClipBounds is not compatible with ChangeBounds in this mode.

Parameters
resizeClip Boolean: Used to indicate whether the view bounds should be modified or the clip bounds should be modified by ChangeBounds.