-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.x shared element prototype #1
base: 1.x
Are you sure you want to change the base?
Conversation
...box/src/main/kotlin/com/bumble/appyx/sandbox/client/sharedelement/SharedElementSliderNode.kt
Fixed
Show fixed
Hide fixed
6ba5533
to
426362b
Compare
...dbox/src/main/kotlin/com/bumble/appyx/sandbox/client/sharedelement/SharedElementFaderNode.kt
Fixed
Show fixed
Hide fixed
cd72599
to
24bbd70
Compare
...dbox/src/main/kotlin/com/bumble/appyx/sandbox/client/sharedelement/SharedElementFaderNode.kt
Fixed
Show fixed
Hide fixed
libraries/core/src/main/kotlin/com/bumble/appyx/core/node/LocalNode.kt
Dismissed
Show dismissed
Hide dismissed
libraries/core/src/main/kotlin/com/bumble/appyx/core/node/LocalNode.kt
Dismissed
Show dismissed
Hide dismissed
...les/sandbox/src/main/kotlin/com/bumble/appyx/sandbox/client/sharedelement/ProfileListNode.kt
Fixed
Show fixed
Hide fixed
...les/sandbox/src/main/kotlin/com/bumble/appyx/sandbox/client/sharedelement/ProfileListNode.kt
Fixed
Show fixed
Hide fixed
Box( | ||
modifier = modifier | ||
.requiredSize(200.dp) | ||
.clickable { | ||
onProfileClick(pageId) | ||
} | ||
) { | ||
val profile = Profile.allProfiles[pageId] | ||
ProfileImage( | ||
profile.drawableRes, modifier = Modifier | ||
.fillMaxSize() | ||
.sharedElementWithCallerManagedVisibility( | ||
sharedContentState = rememberSharedContentState(key = "$pageId image"), | ||
visible = isSharedElementVisible | ||
) | ||
) | ||
Text( | ||
text = "${profile.name}, ${profile.age}", | ||
color = Color.White, | ||
fontSize = 16.sp, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.sharedElementWithCallerManagedVisibility( | ||
sharedContentState = rememberSharedContentState(key = "$pageId text"), | ||
visible = isSharedElementVisible | ||
) | ||
.align(Alignment.BottomStart) | ||
.padding(8.dp) | ||
) | ||
} |
Check warning
Code scanning / detekt
Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with other modifiers e.g. 'modifier.fillMaxWidth()'. Use Modifier (with a capital 'M') to construct a new Modifier that you can pass to other composables. See https://mrmans0n.github.io/compose-rules/rules/#dont-re-use-modifiers for more information. Warning
LazyRow( | ||
modifier = modifier.fillMaxSize(), | ||
contentPadding = PaddingValues(horizontal = 16.dp), | ||
horizontalArrangement = Arrangement.spacedBy(32.dp), | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
repeat(10) { pageId -> | ||
item(key = pageId) { | ||
val sharedScope = LocalSharedElementScope.current | ||
sharedScope.apply { | ||
val isSharedElementVisible by LocalSharedElementVisibility.current | ||
Box( | ||
modifier = modifier | ||
.requiredSize(200.dp) | ||
.clickable { | ||
onProfileClick(pageId) | ||
} | ||
) { | ||
val profile = Profile.allProfiles[pageId] | ||
ProfileImage( | ||
profile.drawableRes, modifier = Modifier | ||
.fillMaxSize() | ||
.sharedElementWithCallerManagedVisibility( | ||
sharedContentState = rememberSharedContentState(key = "$pageId image"), | ||
visible = isSharedElementVisible | ||
) | ||
) | ||
Text( | ||
text = "${profile.name}, ${profile.age}", | ||
color = Color.White, | ||
fontSize = 16.sp, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.sharedElementWithCallerManagedVisibility( | ||
sharedContentState = rememberSharedContentState(key = "$pageId text"), | ||
visible = isSharedElementVisible | ||
) | ||
.align(Alignment.BottomStart) | ||
.padding(8.dp) | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} |
Check warning
Code scanning / detekt
Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with other modifiers e.g. 'modifier.fillMaxWidth()'. Use Modifier (with a capital 'M') to construct a new Modifier that you can pass to other composables. See https://mrmans0n.github.io/compose-rules/rules/#dont-re-use-modifiers for more information. Warning
64f9bf0
to
30a05e4
Compare
30a05e4
to
e2b687a
Compare
a21b415
to
c1c570d
Compare
404b26e
to
06a138c
Compare
79e5f36
to
56485aa
Compare
56485aa
to
53bed47
Compare
…ey/appyx into 1.x-shared-element-prototype
fdce13c
to
ade37a3
Compare
Co-authored-by: Manuel Vivo <manuelvicnt@gmail.com>
Co-authored-by: Manuel Vivo <manuelvicnt@gmail.com>
…e/Children.kt Co-authored-by: Manuel Vivo <manuelvicnt@gmail.com>
Co-authored-by: Manuel Vivo <manuelvicnt@gmail.com>
9c82f72
to
add9216
Compare
- Moved LocalMovableContentMap to Children composable and added a parameter to it. - Added support for more movableContent API variants
add9216
to
76d6c1f
Compare
Description
...
Check list
CHANGELOG.md
if required.