Created
May 23, 2023 12:23
-
-
Save V-Abhilash-1999/9e03de5916e4c6b06fcde353753c5a1d to your computer and use it in GitHub Desktop.
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
val pressOffset = remember { | |
mutableStateOf(Offset.Zero) | |
} | |
Canvas( | |
modifier = Modifier | |
.height(40.dp) | |
.width(300.dp) | |
.clip(RoundedCornerShape(50)) | |
) { | |
..... | |
drawCircle( | |
Color.White, | |
radius = size.height/2, | |
center = Offset(pressOffset.value.x, size.height/2), | |
style = Stroke( | |
width = 2.dp.toPx() | |
) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment