Tolriq
05/11/2023, 6:19 AMval radius = if (isPlaying) 16.dp else 64.dp / 2f
val cornerRadius = animateDpAsState(targetValue = radius, label = "")
Surface(
modifier = Modifier
.size(64.dp)
.clip(RoundedCornerShape(cornerRadius.value))
.combinedClickable(onClick = { viewModel.playPause() }, onLongClick = { viewModel.stop() }),
color = MaterialTheme.colorScheme.primary,
shape = RoundedCornerShape(cornerRadius.value),
)
Removing the shape fix this and the shape was probably not necessary in this case (But the clip necessary for the combinedclickable and the shape was left here for consistency and clarity of intent). Is this normal and was a bug before or should I open an issue ?Rebecca Franks
05/12/2023, 8:48 AMTolriq
05/12/2023, 9:14 AM