Skip to content

Instantly share code, notes, and snippets.

View iniyanmurugavel's full-sized avatar
🎯
Focusing

Iniyan Murugavel iniyanmurugavel

🎯
Focusing
View GitHub Profile
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.VectorConverter
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.RepeatMode
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
@iniyanmurugavel
iniyanmurugavel / StarAnimation.kt
Created July 4, 2025 08:08 — forked from Kyriakos-Georgiopoulos/StarAnimation.kt
Super Mario inspired star animation
@Composable
fun StarAnimation() {
val scope = rememberCoroutineScope()
val offsetY = remember { Animatable(0f) }
val rotation = remember { Animatable(0f) }
var hasLaunched by remember { mutableStateOf(false) }
fun launchAnimation() {
hasLaunched = true
data class GameCountdownState(
val durationMills: Int = 3000,
val circleColor: Color = Color.Yellow,
val textColor: Color = Color.Yellow
)
Composable
fun CountdownScreen(
state: GameCountdownState,
onFinish: () -> Unit,
import androidx.compose.animation.Animatable
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@iniyanmurugavel
iniyanmurugavel / compscreen.txt
Created October 17, 2024 05:37 — forked from Shayan-Sakhaei/compscreen.txt
Compose Screen Android Studio Live Template
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.koin.androidx.compose.koinViewModel
@Composable
fun $NAME$Route(
modifier: Modifier = Modifier,
@iniyanmurugavel
iniyanmurugavel / LazyColumnPosition
Created October 4, 2024 01:04 — forked from ProArun/LazyColumnPosition
Save and Restore the Scroll Position of a LazyColumn Persistently
@OptIn(FlowPreview::class)
@Composable
fun LazyColumnPosition(modifier: Modifier = Modifier) {
val context = LocalContext.current
val pref by lazy {
context.getSharedPreferences("prefs", MODE_PRIVATE)
}
val scrollPosition = pref.getInt("scroll_position", 0)
@iniyanmurugavel
iniyanmurugavel / libs.versions.toml
Created September 18, 2024 04:32 — forked from BobbyESP/libs.versions.toml
A very complete TOML file for Android Development mainly thought for the new Jetpack Compose framework
[versions]
accompanist = "0.29.2-rc"
androidGradlePlugin = "7.4.2"
androidxComposeBom = "2023.01.00"
androidxComposeCompiler = "1.4.6"
androidxCore = "1.10.0-rc01"
androidMaterial = "1.9.0-alpha02"
androidxAppCompat = "1.7.0-alpha02"
androidxActivity = "1.7.1"
markdownDependency = "0.3.2"