Skip to content

Instantly share code, notes, and snippets.

View davidtakac's full-sized avatar

David Takač davidtakac

View GitHub Profile
@davidtakac
davidtakac / ContentLoadingIndicator.kt
Last active May 30, 2023 01:51
ContentLoadingProgressBar in Compose
import androidx.compose.runtime.*
import kotlinx.coroutines.*
private class ContentLoadingIndicatorState(
private val showDelay: Long,
private val minShowTime: Long
) {
private val _isVisible: MutableState<Boolean> = mutableStateOf(false)
val isVisible: Boolean by _isVisible