This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun AnimatedTextSwitcher() { | |
| var isYellowBoxVisibility by remember { mutableStateOf(true) } | |
| LaunchedEffect(Unit) { | |
| while (true) { | |
| delay(3000) | |
| isYellowBoxVisibility = !isYellowBoxVisibility | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.vishal2376.animations.ui.theme | |
| import androidx.compose.animation.animateColorAsState | |
| import androidx.compose.animation.core.EaseInOut | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.clickable | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Box |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.bharatsdk.animationsexamples.ui | |
| import androidx.compose.foundation.clickable | |
| import androidx.compose.runtime.LaunchedEffect | |
| import androidx.compose.runtime.getValue | |
| import androidx.compose.runtime.mutableStateOf | |
| import androidx.compose.runtime.remember | |
| import androidx.compose.runtime.setValue | |
| import androidx.compose.ui.Modifier | |
| import androidx.compose.ui.composed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun InteractiveCanvas(maxWidth: Int, maxHeight: Int) { | |
| val random = remember { Random.Default } | |
| var touchPosition by remember { mutableStateOf(Offset.Unspecified) } | |
| val heartSize = 75F | |
| val heartPath = createHeartPath(heartSize) | |
| val heartOffsets = remember { mutableStateListOf<Offset>() } | |
| val heartColors = remember { mutableStateListOf<Color>() } | |
| if (heartOffsets.isEmpty()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MainActivity : ComponentActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| enableEdgeToEdge() | |
| setContent { | |
| TicTacToeGameTheme { | |
| TicTacToeGame() | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MainActivity : ComponentActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| enableEdgeToEdge() | |
| setContent { | |
| SampleUiDesignForCartTheme { | |
| ScratchCardView() | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface SettingsSectionScope { | |
| fun item( | |
| icon: ImageVector? = null, | |
| title: String, | |
| subtitle: String? = null, | |
| endSlot: @Composable () -> Unit = { }, | |
| onClick: (() -> Unit)? = null, | |
| ) | |
| @Composable |
NewerOlder