Skip to content

Instantly share code, notes, and snippets.

View ddekanski's full-sized avatar

Daniel Dekanski ddekanski

View GitHub Profile
@inidamleader
inidamleader / ListPicker.kt
Last active April 21, 2025 18:50
ListPicker: Generic compose picker (Number picker, date or any other type) function to select an item from a list by scrolling through the list with: possibility of editing and wrapSelectorWheel parameter
package com.inidamleader.ovtracker.util.compose
import androidx.compose.animation.AnimatedContent
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
@kliphouse
kliphouse / IndefinitePagerIndicator.kt
Last active March 17, 2025 18:18
A horizontal pager indicator for compose that uses [PagerState](https://google.github.io/accompanist/pager/#pagerstate) (based on [IndefinitePagerIndicator](https://github.com/wching/Android-Indefinite-Pager-Indicator)
package com.rbrooks.indefinitepagerindicator
import android.view.animation.DecelerateInterpolator
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.ContentAlpha
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf