{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Transition.Segment

@<Error class: unknown class>
public interface Transition.Segment<S extends Object>

Known direct subclasses
AnimatedContentTransitionScope

AnimatedContentTransitionScope provides functions that are convenient and only applicable in the context of AnimatedContent, such as slideIntoContainer and slideOutOfContainer.


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.

Summary

Public methods

abstract @NonNull S

Initial state of a Transition Segment.

abstract @NonNull S

Target state of a Transition Segment.

default boolean
isTransitioningTo(@NonNull S receiver, @NonNull S targetState)

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

Public methods

getInitialState

abstract @NonNullgetInitialState()

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

getTargetState

abstract @NonNullgetTargetState()

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

isTransitioningTo

default boolean isTransitioningTo(@NonNull S receiver, @NonNull S targetState)

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