Skip to content

Instantly share code, notes, and snippets.

@V-Abhilash-1999
Created May 23, 2023 12:23
Show Gist options
  • Save V-Abhilash-1999/9e03de5916e4c6b06fcde353753c5a1d to your computer and use it in GitHub Desktop.
Save V-Abhilash-1999/9e03de5916e4c6b06fcde353753c5a1d to your computer and use it in GitHub Desktop.
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