fix(date-recorder): preserve rounded corners during shared element view mode transition
This commit is contained in:
parent
1248dff648
commit
d40c6d59b3
@ -959,6 +959,7 @@ private fun SharedTransitionScope.TimelineRecordCard(
|
|||||||
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
|
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.clip(RoundedCornerShape(16.dp))
|
||||||
.sharedBounds(
|
.sharedBounds(
|
||||||
sharedContentState = rememberSharedContentState(key = "card_${record.id}"),
|
sharedContentState = rememberSharedContentState(key = "card_${record.id}"),
|
||||||
animatedVisibilityScope = animatedVisibilityScope
|
animatedVisibilityScope = animatedVisibilityScope
|
||||||
@ -1079,6 +1080,7 @@ private fun SharedTransitionScope.GridRecordCard(
|
|||||||
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
|
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.clip(RoundedCornerShape(14.dp))
|
||||||
.sharedBounds(
|
.sharedBounds(
|
||||||
sharedContentState = rememberSharedContentState(key = "card_${record.id}"),
|
sharedContentState = rememberSharedContentState(key = "card_${record.id}"),
|
||||||
animatedVisibilityScope = animatedVisibilityScope
|
animatedVisibilityScope = animatedVisibilityScope
|
||||||
@ -1096,6 +1098,7 @@ private fun SharedTransitionScope.GridRecordCard(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.aspectRatio(1f)
|
.aspectRatio(1f)
|
||||||
|
.clip(RoundedCornerShape(14.dp))
|
||||||
.sharedElement(
|
.sharedElement(
|
||||||
sharedContentState = rememberSharedContentState(key = "photo_${record.id}"),
|
sharedContentState = rememberSharedContentState(key = "photo_${record.id}"),
|
||||||
animatedVisibilityScope = animatedVisibilityScope
|
animatedVisibilityScope = animatedVisibilityScope
|
||||||
@ -1184,9 +1187,9 @@ private fun SharedTransitionScope.CompactRecordCard(
|
|||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
shape = RoundedCornerShape(8.dp),
|
shape = RoundedCornerShape(8.dp),
|
||||||
border = BorderStroke(borderWidth, MaterialTheme.colorScheme.primary),
|
border = BorderStroke(borderWidth, MaterialTheme.colorScheme.primary),
|
||||||
elevation = CardDefaults.cardElevation(defaultElevation = 0.dp),
|
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.clip(RoundedCornerShape(8.dp))
|
||||||
.sharedBounds(
|
.sharedBounds(
|
||||||
sharedContentState = rememberSharedContentState(key = "card_${record.id}"),
|
sharedContentState = rememberSharedContentState(key = "card_${record.id}"),
|
||||||
animatedVisibilityScope = animatedVisibilityScope
|
animatedVisibilityScope = animatedVisibilityScope
|
||||||
@ -1204,6 +1207,7 @@ private fun SharedTransitionScope.CompactRecordCard(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.aspectRatio(1f)
|
.aspectRatio(1f)
|
||||||
|
.clip(RoundedCornerShape(8.dp))
|
||||||
.sharedElement(
|
.sharedElement(
|
||||||
sharedContentState = rememberSharedContentState(key = "photo_${record.id}"),
|
sharedContentState = rememberSharedContentState(key = "photo_${record.id}"),
|
||||||
animatedVisibilityScope = animatedVisibilityScope
|
animatedVisibilityScope = animatedVisibilityScope
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user