transitionx / in.arunkumarsampath.transitionx.transition.changetext / ChangeText

ChangeText

class ChangeText : Transition

This transition tracks changes to the text in TextView targets. If the text changes between the start and end scenes, the transition ensures that the starting text stays until the transition ends, at which point it changes to the end text. This is useful in situations where you want to resize a text view to its new size before displaying the text that goes there.

Constructors

<init>

ChangeText()

This transition tracks changes to the text in TextView targets. If the text changes between the start and end scenes, the transition ensures that the starting text stays until the transition ends, at which point it changes to the end text. This is useful in situations where you want to resize a text view to its new size before displaying the text that goes there.

Properties

changeBehavior

var changeBehavior: Int

The type of fading animation to use when this transition is run. One of CHANGE_BEHAVIOR_KEEP, CHANGE_BEHAVIOR_OUT, CHANGE_BEHAVIOR_IN, and CHANGE_BEHAVIOR_OUT_IN.

Functions

captureEndValues

fun captureEndValues(transitionValues: TransitionValues): Unit

captureStartValues

fun captureStartValues(transitionValues: TransitionValues): Unit

createAnimator

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

getTransitionProperties

fun getTransitionProperties(): Array<String>

Companion Object Properties

CHANGE_BEHAVIOR_IN

const val CHANGE_BEHAVIOR_IN: Int

Flag specifying that the text changing animation should fade in the end text into the affected target view(s). This transition is typically used in conjunction with an earlier .CHANGE_BEHAVIOR_OUT transition, possibly with other transitions running as well, such as a sequence to fade out, then resize the view, then fade in.

CHANGE_BEHAVIOR_KEEP

const val CHANGE_BEHAVIOR_KEEP: Int

Flag specifying that the text in affected/changing TextView targets will keep their original text during the transition, setting it to the final text when the transition ends. This is the default behavior.

CHANGE_BEHAVIOR_OUT

const val CHANGE_BEHAVIOR_OUT: Int

Flag specifying that the text changing animation should first fade out the original text completely. The new text is set on the target view at the end of the fade-out animation. This transition is typically used with a later .CHANGE_BEHAVIOR_IN transition, allowing more flexibility than the .CHANGE_BEHAVIOR_OUT_IN by allowing other transitions to be run sequentially or in parallel with these fades.

CHANGE_BEHAVIOR_OUT_IN

const val CHANGE_BEHAVIOR_OUT_IN: Int

Flag specifying that the text changing animation should first fade out the original text completely and then fade in the new text.