OverlayManager

interface OverlayManager

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

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Слушатель события отмены/закрытия OverlayEntry

Properties

Link copied to clipboard
abstract val overlays: StateFlow<List<OverlayEntry>>

Элементы для отображения

Functions

Link copied to clipboard

Добавляет слушатель события dismiss

Link copied to clipboard
abstract fun clear()

Очистить все элементы

Link copied to clipboard
abstract fun remove(id: Long)

Удаляет элемент с идентификатором id

Link copied to clipboard

Удаляет слушатель события dismiss

Link copied to clipboard
abstract fun show(entry: OverlayEntry): Long

Показывает элемент entry

abstract fun show(position: OverlayPosition = OverlayPosition.TopCenter, durationMillis: Long? = OVERLAY_DURATION_SLOW_MILLIS, animationSpec: OverlayAnimationSpec? = null, isFocusable: Boolean = false, content: @Composable (Long) -> Unit): Long

Показывает элемент

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