Skip to content

Commit

Permalink
Merge pull request #12 from shinhyo/fix_character_card
Browse files Browse the repository at this point in the history
fix: sharedElement to card
  • Loading branch information
shinhyo authored May 8, 2024
2 parents 2aad747 + 2e142cb commit 69eda79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ fun SharedTransitionScope.BrbaCharacterCard(
shape = RoundedCornerShape(8.dp),
modifier = modifier
.aspectRatio(1f / character.ratio)
.clickable { onCharacterClick.invoke(character) },
.clickable { onCharacterClick.invoke(character) }
.brbaSharedElement(
isLocalInspectionMode = LocalInspectionMode.current,
animatedVisibilityScope = animatedVisibilityScope,
rememberSharedContentState(key = "character_${character.charId}_card"),
),
) {
Box(
modifier = Modifier
Expand All @@ -75,12 +80,7 @@ fun SharedTransitionScope.BrbaCharacterCard(
contentDescription = null,
contentScale = ContentScale.Crop,
modifier = Modifier
.fillMaxSize()
.brbaSharedElement(
isLocalInspectionMode = LocalInspectionMode.current,
animatedVisibilityScope = animatedVisibilityScope,
rememberSharedContentState(key = "character_${character.charId}_card"),
),
.fillMaxSize(),
)
Box(
modifier = Modifier
Expand Down
Binary file modified gif/0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 69eda79

Please sign in to comment.