Skip to content

Instantly share code, notes, and snippets.

View nascimentodiego's full-sized avatar
🏠
Working from home

Diego Nascimento nascimentodiego

🏠
Working from home
View GitHub Profile
@nascimentodiego
nascimentodiego / PageIndicator.kt
Created August 7, 2026 18:20
PageIndicator in compose with PagerState
package com.dfn.animations.ui.compose.coverflow
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.pager.PagerState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.CornerRadius
import androidx.compose.ui.geometry.Offset
package com.dfn.animations.ui.compose.coverflow.cards
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
//app build.gradle
apply plugin: 'kotlin-kapt'
...
dependencies {
{
//Moshi Core
implementation "com.squareup.moshi:moshi:1.8.0"
//Moshi Codegen