Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/material-1.1.0-alpha01' into mat…
Browse files Browse the repository at this point in the history
…erial-1.1.0-alpha01

# Conflicts:
#	CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt
  • Loading branch information
Rob Orgiu committed Sep 5, 2024
2 parents 2284ca3 + 288fdc9 commit 9b16e3c
Showing 1 changed file with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,21 @@ private fun DetailContent(
) {
if (definedWord != null) {

val imageModifier = Modifier.padding(horizontal = 8.dp)
if (!isListAndDetailVisible && isDetailVisible) {
with(sharedTransitionScope) {
val state = rememberSharedContentState(key = definedWord.word)
imageModifier.then(
Modifier.sharedElement(
state,
animatedVisibilityScope = animatedVisibilityScope
)
)
}
}
val imageModifier = Modifier
.padding(horizontal = 8.dp)
.then(
if (!isListAndDetailVisible && isDetailVisible) {
with(sharedTransitionScope) {
val state = rememberSharedContentState(key = definedWord.word)
Modifier.sharedElement(
state,
animatedVisibilityScope = animatedVisibilityScope
)
}
} else {
Modifier
}
)

Image(
painter = painterResource(id = definedWord.icon),
Expand Down

0 comments on commit 9b16e3c

Please sign in to comment.