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 CircleMap() { | |
// Define the coordinates for circle centers and their associated information | |
val circleData = listOf( | |
CircleInfo("Park A", LatLng(37.7749, -122.4194), "This is Park A"), | |
CircleInfo("Park B", LatLng(36.7783, -119.4179), "This is Park B"), | |
CircleInfo("Park C", LatLng(34.0522, -118.2437), "This is Park C") | |
) | |
// Create a mutable state to track the selected circle |
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 AbstractArtText(){ | |
val abstractArtText = buildAnnotatedString { | |
withStyle(style = SpanStyle(fontSize = 42.sp, brush = Brush.horizontalGradient(listOf(Color.Red, Color.Blue, Color.Green)))) { | |
append("Colors in Motion") | |
} | |
append("\n\n") | |
append("Vivid shades of ") | |
withStyle(style = SpanStyle(brush = Brush.verticalGradient(listOf(Color.Magenta, Color.Yellow)))) { | |
append("passion") |
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 Chart(){ | |
val temperatureData = listOf( | |
DataPoint(20f, SampleColors.lighterPink), | |
DataPoint(45f, SampleColors.lightBlue), | |
DataPoint(130f, SampleColors.darkPink), | |
DataPoint(80f, SampleColors.lightPink), | |
DataPoint(65f, Color.Cyan) | |
) |
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
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.keyframes | |
import androidx.compose.animation.core.rememberInfiniteTransition | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.composed | |
import androidx.compose.ui.draw.drawWithContent | |
import androidx.compose.ui.graphics.Brush |
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
/** | |
* Created by Nirbhay Pherwani on 8/14/2023. | |
* Linktree - https://linktree.com/nirbhaypherwani | |
*/ | |
data class Like(val userName: String, val postTitle: String, val reactionName: String) | |
data class Comment(val userName: String, val postTitle: String, val commentText: String) | |
data class Post(val userName: String, val postTitle: String) |
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
/** | |
* Author - Nirbhay Pherwani | |
* Medium - https://medium.com/@pherwani37 | |
* LinkedIn - https://linkedin.com/in/nirbhaypherwani | |
* Medium Article Title - Seamless Play of D&D — Implementing Drag and Drop Across Multiple Screens in Your Android App with Jetpack Compose | |
*/ | |
import android.content.Context | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.ExperimentalFoundationApi |