ImmersiveListBackgroundScope


@ExperimentalTvMaterial3Api
class ImmersiveListBackgroundScope : BoxScope


Summary

Public functions

Unit
@Composable
AnimatedContent(
    targetState: Int,
    modifier: Modifier,
    transitionSpec: AnimatedContentTransitionScope<Int>.() -> ContentTransform,
    contentAlignment: Alignment,
    content: @Composable AnimatedVisibilityScope.(targetState: Int) -> Unit
)

ImmersiveListBackgroundScope.AnimatedContent is a container that automatically animates its content when targetState changes.

Unit
@Composable
AnimatedVisibility(
    visible: Boolean,
    modifier: Modifier,
    enter: EnterTransition,
    exit: ExitTransition,
    label: String,
    content: @Composable AnimatedVisibilityScope.() -> Unit
)

ImmersiveListBackgroundScope.AnimatedVisibility composable animates the appearance and disappearance of its content, as visible value changes.

Public functions

AnimatedContent

Added in 1.0.0-alpha10
@Composable
fun AnimatedContent(
    targetState: Int,
    modifier: Modifier = Modifier,
    transitionSpec: AnimatedContentTransitionScope<Int>.() -> ContentTransform = { ImmersiveListDefaults.EnterTransition.togetherWith(ImmersiveListDefaults.ExitTransition) },
    contentAlignment: Alignment = Alignment.TopStart,
    content: @Composable AnimatedVisibilityScope.(targetState: Int) -> Unit
): Unit

ImmersiveListBackgroundScope.AnimatedContent is a container that automatically animates its content when targetState changes. Its content for different target states is defined in a mapping between a target state and a composable function.

androidx.compose.animation.AnimatedContent

Parameters
targetState: Int

defines the key to choose the content to be displayed

modifier: Modifier = Modifier

modifier for the Layout created to contain the content

transitionSpec: AnimatedContentTransitionScope<Int>.() -> ContentTransform = { ImmersiveListDefaults.EnterTransition.togetherWith(ImmersiveListDefaults.ExitTransition) }

defines the EnterTransition(s) and ExitTransition(s) used to display and remove the content, fading in and fading out by default

contentAlignment: Alignment = Alignment.TopStart

specifies how the background content should be aligned in the container

content: @Composable AnimatedVisibilityScope.(targetState: Int) -> Unit

Content to appear or disappear based on the value of targetState

AnimatedVisibility

Added in 1.0.0-alpha10
@Composable
fun AnimatedVisibility(
    visible: Boolean,
    modifier: Modifier = Modifier,
    enter: EnterTransition = ImmersiveListDefaults.EnterTransition,
    exit: ExitTransition = ImmersiveListDefaults.ExitTransition,
    label: String = "AnimatedVisibility",
    content: @Composable AnimatedVisibilityScope.() -> Unit
): Unit

ImmersiveListBackgroundScope.AnimatedVisibility composable animates the appearance and disappearance of its content, as visible value changes. Different EnterTransitions and ExitTransitions can be defined in enter and exit for the appearance and disappearance animation.

androidx.compose.animation.AnimatedVisibility

Parameters
visible: Boolean

defines whether the content should be visible

modifier: Modifier = Modifier

modifier for the Layout created to contain the content

enter: EnterTransition = ImmersiveListDefaults.EnterTransition

EnterTransition(s) used for the appearing animation, fading in by default

exit: ExitTransition = ImmersiveListDefaults.ExitTransition

ExitTransition(s) used for the disappearing animation, fading out by default

label: String = "AnimatedVisibility"

helps differentiate from other animations in Android Studio

content: @Composable AnimatedVisibilityScope.() -> Unit

Content to appear or disappear based on the value of visible