Skip to content

Instantly share code, notes, and snippets.

View chiragthummar's full-sized avatar
🎯
Focusing

Chirag Thummar chiragthummar

🎯
Focusing
View GitHub Profile
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
BorderPathTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Box(
modifier = Modifier
.fillMaxSize()
@bharath914
bharath914 / cardanimation.kt
Created April 13, 2024 04:31
Quick Card Animation in Jetpack Compose
val animatable = remember {
Animatable(0.5f)
}
LaunchedEffect(key1 = true) {
animatable.animateTo(1f, tween(350, easing = FastOutSlowInEasing))
// you can tweak out and customize these animations.
}
// add this animatable to your card's modifier graphics layer.
BookItem(modifier = cardMod.graphicsLayer {
this.scaleX = animatable.value
//settings.gradle.kts
dependencyResolutionManagement {
repositories {
maven { url = uri("https://androidx.dev/snapshots/builds/11670047/artifacts/repository/") }
google()
mavenCentral()
maven(url = "https://plugins.gradle.org/m2/")
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev")
}