transitionx / in.arunkumarsampath.transitionx.transition.set / TransitionSetBuilder

TransitionSetBuilder

open class TransitionSetBuilder<T : TransitionSet> : TransitionBuilder<TransitionSet>

TransitionBuilder implementation for constructing TransitionSet instances.

See Also

TransitionSet

Constructors

<init>

TransitionSetBuilder(transitionSet: T)

TransitionBuilder implementation for constructing TransitionSet instances.

Inherited Properties

duration

var duration: Long

Sets the duration for this transition

interpolator

var interpolator: TimeInterpolator?

TimeInterpolator for this transition.

pathMotion

var pathMotion: PathMotion?

PathMotion for this transition.

startDelay

var startDelay: Long

Set a start delay in milliseconds to this transition

transition

val transition: T

transitionPropagation

var transitionPropagation: TransitionPropagation?

TransitionPropagation for this transition. Propagations are use to control start delays for transition. For example, CircularPropagation has increased start delays from the focal point and Explode defaults to using that.

Functions

auto

fun auto(autoBuilder: AutoTransitionBuilder.() -> Unit = {}): Unit

Adds an AutoTransition to this transition

changeClipBounds

fun changeClipBounds(changeClipBoundsBuilder: ChangeClipBoundsBuilder.() -> Unit = {}): Unit

Adds a ChangeClipBounds transition to this transition that animates changes to ChangeClipBounds

changeColor

fun changeColor(changeColorBuilder: ChangeColorBuilder.() -> Unit = {}): Unit

Adds ChangeColor transition to this transition.

changeImage

fun changeImage(changeImageBuilder: ChangeImageBuilder.() -> Unit = {}): Unit

Adds a ChangeImageTransform transition to this transtion that animates changes to ImageView's image matrix and ImageView.ScaleType

changeScroll

fun changeScroll(changeScrollBuilder: ChangeScrollBuilder.() -> Unit = {}): Unit

Adds ChangeScroll transition to this transition that animates changes to View's scroll properties

changeText

fun changeText(changeTextBuilder: ChangeTextBuilder.() -> Unit = {}): Unit

Adds ChangeText transition to this transition.

customTransition

fun <T : Transition> customTransition(transitionBuilder: TransitionBuilder<T>.() -> Unit = {}): Unit

Instantiates Transition of type T and adds to this transition. The T type must have a public no arg constructor for the instantiation to work.

fun <T : Transition> customTransition(transition: T, transitionBuilder: TransitionBuilder<T>.() -> Unit = {}): Unit

Alternative to customTransition that takes an already instantiated transition instance and allows additional configuration via the transitionBuilder block.

explode

fun explode(explodeBuilder: ExplodeBuilder.() -> Unit = {}): Unit

Adds an Explode transition to this transition that does explode transition when View's visibility changes as described by Visibility

fade

fun fade(fadeMode: Int = Fade.IN or Fade.OUT, fadeBuilder: FadeBuilder.() -> Unit = {}): Unit

Adds a Fade transition to this transition. Fade triggers on visibility changes.

fadeIn

fun fadeIn(fadeBuilder: FadeBuilder.() -> Unit = {}): Unit

Adds a Fade transition that triggers only when the views appear as per condition described by Visibility.isVisible

fadeOut

fun fadeOut(fadeBuilder: FadeBuilder.() -> Unit = {}): Unit

Adds a Fade transition that triggers only when the views disappear as per condition described by Visibility.isVisible

get

operator fun get(index: Int): Transition

Returns the Transition at index

moveResize

fun moveResize(changeBoundsBuilder: ChangeBoundsBuilder.() -> Unit = {}): Unit

Adds a ChangeBounds transition to this transition that animates when Views move or change their bounds.

scaleRotate

fun scaleRotate(scaleRotateBuilder: ScaleRotateBuilder.() -> Unit = {}): Unit

Adds a ChangeTransform to this transition. This transition animates View's scale or rotate properties change.

sequentially

fun sequentially(): Unit

Runs all Transitions contained in this TransitionSet sequentially

slide

fun slide(slideBuilder: SlideBuilder.() -> Unit = {}): Unit

Adds a Slide transition to this transition. Slide triggers on visibility changes.

together

fun together(): Unit

Runs all Transitions contained in this TransitionSet together

transitionSet

fun transitionSet(setBuilder: DefaultTransitionSetBuilder.() -> Unit = {}): Unit

Create another TransitionSet and add it to this transition set. The block setBuilder can contain code to configure the created TransitionSet

unaryMinus

operator fun Transition.unaryMinus(): Unit

Remove a transition from this transition set.

unaryPlus

operator fun Transition.unaryPlus(): Unit

Add a transition to this transition set.

Inherited Functions

add

fun add(vararg views: View): Unit

Adds all views as targets to this transition.

fun add(vararg ids: Int): Unit

Adds all view ids as targets to this transition.

fun add(vararg transitionTargetNames: String): Unit

Adds all transitionTargetNames as targets to this transition

addListener

fun Transition.addListener(onEnd: (transition: Transition) -> Unit = null, onStart: (transition: Transition) -> Unit = null, onCancel: (transition: Transition) -> Unit = null, onResume: (transition: Transition) -> Unit = null, onPause: (transition: Transition) -> Unit = null): Unit

Add actions at different stages of Transition. Repeated blocks does not override previously added block but instead run one after another.

customProperties

fun customProperties(action: Transition.() -> Unit): Unit

Builder to set custom properties to be built Transition object. In the action block, transition is received as the lambda receiver and it is possible to directly set any custom properties on the transition.

ease

fun ease(easeBuilder: Easing.() -> Interpolator): Unit

Builder to add one of the inbuilt easing as per Material Design guidelines. Calling this overwrites any previously set transitions.

exclude

fun exclude(vararg views: View): Unit

Exclude givens views from this transition. The transition will not affect these views during execution.

fun <Type : View> exclude(): Unit

Exclude givens View from this transition. The transition will not affect views of Type during execution.

fun exclude(vararg ids: Int): Unit

Exclude givens View ids from this transition. The transition will not affect views with this ids

excludeChildren

fun excludeChildren(vararg views: View): Unit

Exclude children of given views from participating in this transition.

fun <Type : View> excludeChildren(): Unit

Exclude children of given Type from participating in this transition.

fun excludeChildren(vararg ids: Int): Unit

Exclude children of given view ids from participating in this transition.

onCancel

fun onCancel(onCancel: (transition: Transition) -> Unit): Unit

Executes onCancel during Transition.TransitionListener.onTransitionCancel

onEnd

fun onEnd(onEnd: (transition: Transition) -> Unit): Unit

Executes onEnd block after transition completes.

onPause

fun onPause(onPause: (transition: Transition) -> Unit): Unit

Executes onPause during Transition.TransitionListener.onTransitionPause

onResume

fun onResume(onResume: (transition: Transition) -> Unit): Unit

Executes onResume during Transition.TransitionListener.onTransitionResume

onStart

fun onStart(onStart: (transition: Transition) -> Unit): Unit

Executes onStart during Transition.TransitionListener.onTransitionStart

remove

fun remove(vararg views: View): Unit

Remove all views as targets from this transition.

fun remove(vararg ids: Int): Unit

Remove all view ids as targets from this transition.

unaryMinus

operator fun String.unaryMinus(): Unit

Remove a target identified by targetName from this transition.

operator fun <Type> Type.unaryMinus(): Unit

Remove targets of type Type from this transition

operator fun View.unaryMinus(): Unit

Remove a target View from this transition.

unaryPlus

operator fun String.unaryPlus(): Unit

Add a target identified by targetName to this transition.

operator fun <Type> Type.unaryPlus(): Unit

Add targets of type Type to this transition

operator fun View.unaryPlus(): Unit

Add a target View to this transition.

Inheritors

AutoTransitionBuilder

class AutoTransitionBuilder : TransitionSetBuilder<TransitionSet>

Builder for building a TransitionSet with AutoTransition already added.

DefaultTransitionSetBuilder

class DefaultTransitionSetBuilder : TransitionSetBuilder<TransitionSet>

Base builder for building a TransitionSet