Package-level declarations

Types

Link copied to clipboard
data class OverlayAnimationSpec(val enter: EnterTransition = DefaultEnterTransition, val exit: ExitTransition = DefaultExitTransition)

Настройки анимации элемента overlay

Link copied to clipboard

Направление движения жеста Swipe для отмены OverlayEntry

Link copied to clipboard
data class OverlayEntry(val id: Long = platformCurrentTimeMillis(), val content: @Composable (Long) -> Unit, val position: OverlayPosition = OverlayPosition.TopCenter, val durationMillis: Long? = null, val visible: MutableTransitionState<Boolean> = MutableTransitionState(false), val animationSpec: OverlayAnimationSpec? = null, val isFocusable: Boolean = false)

Элемент overlay

Link copied to clipboard
interface OverlayManager

Менеджер для показа notification, toast и т.д.

Link copied to clipboard
Link copied to clipboard

Режим размещения для OverlayManager

Properties

Functions

Link copied to clipboard
fun OverlayHost(overlayManager: OverlayManager = overlayManager(), animationSpec: OverlayAnimationSpec = OverlayAnimationSpec(), content: @Composable () -> Unit)
fun OverlayHost(dismissDirection: Set<OverlayDismissDirection>, overlayManager: OverlayManager = overlayManager(), animationSpec: OverlayAnimationSpec = OverlayAnimationSpec(), offset: DpOffset = DpOffset.Zero, spacing: Dp = 8.dp, content: @Composable () -> Unit)
fun OverlayHost(applySystemBarInsets: Boolean, dismissDirection: Set<OverlayDismissDirection> = setOf(DismissToEnd, DismissToStart), overlayManager: OverlayManager = overlayManager(), animationSpec: OverlayAnimationSpec = OverlayAnimationSpec(), offset: DpOffset = DpOffset.Zero, spacing: Dp = 8.dp, contentPadding: PaddingValues = PaddingValues(0.dp), content: @Composable () -> Unit)

Делает доступным overlayManager для content

Link copied to clipboard
fun overlayManager(lifecycle: OverlayManagerLifecycle = OverlayManagerLifecycle.ViewModelScoped): OverlayManager

Создает и запоминает OverlayManager

Link copied to clipboard
fun OverlayManager.showNotification(position: OverlayPosition = OverlayPosition.BottomEnd, durationMillis: Long? = OVERLAY_DURATION_SLOW_MILLIS, animationSpec: OverlayAnimationSpec? = null, isFocusable: Boolean = false, content: @Composable (Long) -> Unit): Long
fun OverlayManager.showNotification(onDismiss: (Long) -> Unit, position: OverlayPosition = OverlayPosition.BottomEnd, durationMillis: Long? = OVERLAY_DURATION_SLOW_MILLIS, animationSpec: OverlayAnimationSpec? = null, isFocusable: Boolean = false, content: @Composable (Long) -> Unit): Long

Показывает notification

Link copied to clipboard
fun OverlayManager.showToast(position: OverlayPosition = OverlayPosition.BottomCenter, durationMillis: Long? = OVERLAY_DURATION_SLOW_MILLIS, animationSpec: OverlayAnimationSpec? = null, content: @Composable (Long) -> Unit): Long
fun OverlayManager.showToast(onDismiss: (Long) -> Unit, position: OverlayPosition = OverlayPosition.BottomCenter, durationMillis: Long? = OVERLAY_DURATION_SLOW_MILLIS, animationSpec: OverlayAnimationSpec? = null, content: @Composable (Long) -> Unit): Long

Показывает toast