-
Notifications
You must be signed in to change notification settings - Fork 2
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
GS attempt at Bumble Challenge #1
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ class RecentsTransitionHandler<NavTarget>( | |
val alpha: Float = 1f, | ||
val scale: Float = 1f, | ||
val zIndex: Float = Z_INDEX | ||
|
||
) | ||
|
||
private val created = Props() | ||
|
@@ -48,7 +49,10 @@ class RecentsTransitionHandler<NavTarget>( | |
when (this) { | ||
is State.Created -> created.copy(offset = Offset(0f, 2f * height)) | ||
is State.Active -> active.copy(offset = activeOffset()) | ||
is State.Frozen -> TODO("(4) Frozen state should have blur of 15.dp. Note that blur only works Android 12+") | ||
is State.Frozen -> active.copy() //I honestly have no idea how this should be implemented, as createModifier already seems to cover this.. | ||
//is State.Frozen -> createModifier(Modifier.blur(15.dp)) | ||
//is State.Frozen -> active.copy(specDp(15.dp)) | ||
//is State.Frozen -> TODO("(4) Frozen state should have blur of 15.dp. Note that blur only works Android 12+") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In order to fix this you'd need to add a new property to Then define a field You'll return the Then similarly to how we animate the other props, you'd add something like this inside
then apply this to your modifier:
|
||
is State.Stashed -> stashed.copy( | ||
offset = stashedOffset(height), | ||
alpha = stashedAlpha(), | ||
|
@@ -112,7 +116,10 @@ class RecentsTransitionHandler<NavTarget>( | |
} | ||
.alpha(alpha) | ||
.blur( | ||
radius = 0.dp, // TODO("(5) Frozen elements should have 15.dp blur, all other elements - 0.dp") | ||
when(transition.currentState){ | ||
is State.Frozen -> 15.dp | ||
else -> 0.dp | ||
}, // TODO("(5) Frozen elements should have 15.dp blur, all other elements - 0.dp") | ||
edgeTreatment = BlurredEdgeTreatment( | ||
RoundedCornerShape(2) | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we'd like to be able to apply the
ToggleFreeze
operation when an element is Active or Frozen.elements.any { it.targetState is Active || it.targetState is Frozen }