Skip to content

Instantly share code, notes, and snippets.

View CyrilFind's full-sized avatar

Cyril Findeling CyrilFind

View GitHub Profile
@denis-ismailaj
denis-ismailaj / WormPageIndicator.kt
Last active August 21, 2023 11:24
Animated worm page indicator composable for Jetpack Compose
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.requiredWidth
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.CornerRadius
@mxalbert1996
mxalbert1996 / AlertDialog.kt
Last active October 12, 2021 06:59
General-purpose AlertDialog for Jetpack Compose
import androidx.compose.animation.animateContentSize
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.unit.dp