Interface

Transition.Segment

Segment holds initialState and targetState, which are the beginning and end of a transition.

Source set: Common
public interface Segment<S>

Segment holds initialState and targetState, which are the beginning and end of a transition. These states will be used to obtain the animation spec that will be used for this transition from the child animations.

Properties

initialState

Source set: Common
public val initialState: S

Initial state of a Transition Segment. This is the state that transition starts from.

targetState

Source set: Common
public val targetState: S

Target state of a Transition Segment. This is the state that transition will end on.

Functions

isTransitioningTo

Source set: Common
public infix fun S.isTransitioningTo(targetState: S): Boolean

Returns whether the provided state matches the initialState && the provided targetState matches Segment.targetState.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: