Skip to content

Instantly share code, notes, and snippets.

View Merkost's full-sized avatar
🎯
Focusing

Konstantin Merenkov Merkost

🎯
Focusing
View GitHub Profile
@Merkost
Merkost / SliderPulsatingEffectModifier.kt
Last active April 5, 2024 00:53
Spotify-Inspired Audio Buffering Slider with Jetpack Compose
fun Modifier.pulsatingEffect(
currentValue: Float,
isVisible: Boolean,
color: Color = Color.Gray,
): Modifier = composed {
var trackWidth by remember { mutableFloatStateOf(0f) }
val thumbX by remember(currentValue) {
mutableFloatStateOf(trackWidth * currentValue)
}
@Merkost
Merkost / Jetpack Compose - RecyclerView with Sticky Headers - MainActivity.kt Jetpack Compose RecyclerView with Sticky Header and network images using Coil
package eu.anifantakis.composeapp
import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items