Created
February 25, 2024 09:00
-
-
Save ahmed3elshaer/83754be3db6b9b69e8ce77f5f8742b30 to your computer and use it in GitHub Desktop.
MaterialYouLightAnimatedGradient
This file contains 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 AnimatedLoadingGradient( | |
) { | |
val primaryColor = MaterialTheme.colorScheme.onTertiaryContainer | |
val containerColor = MaterialTheme.colorScheme.primary | |
Column( | |
modifier = Modifier | |
.fillMaxSize() | |
.padding(16.dp) | |
) { | |
Box( | |
modifier = Modifier | |
.height(20.dp) | |
.fillMaxWidth() | |
.animatedGradient( | |
primaryColor = primaryColor, | |
containerColor = containerColor | |
) | |
) | |
Spacer(modifier = Modifier.height(16.dp)) | |
Box( | |
modifier = Modifier | |
.height(20.dp) | |
.fillMaxWidth() | |
.animatedGradient( | |
primaryColor = primaryColor, | |
containerColor = containerColor | |
) | |
) | |
Spacer(modifier = Modifier.height(16.dp)) | |
Box( | |
modifier = Modifier | |
.height(20.dp) | |
.fillMaxWidth(fraction = 0.7f) | |
.animatedGradient( | |
primaryColor = primaryColor, | |
containerColor = containerColor | |
) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment