-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Jetsnack - Migrate to Material 3 #1437
Conversation
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.
Nice work!
// val isDismissed = dismissState.currentValue == SwipeToDismissBoxValue. | ||
// Returns the swiped value in dp | ||
val offset = with(LocalDensity.current) { dismissState.offset.value.toDp() } | ||
// val offset = with(LocalDensity.current) { dismissState.offset.value.toDp() } | ||
|
||
AnimatedVisibility( | ||
/* AnimatedVisibility( | ||
modifier = modifier, | ||
visible = !isDismissed, | ||
enter = enter, | ||
exit = exit | ||
) {*/ | ||
SwipeToDismissBox( | ||
modifier = modifier, | ||
visible = !isDismissed, | ||
enter = enter, | ||
exit = exit | ||
) { | ||
SwipeToDismiss( | ||
modifier = modifier, | ||
state = dismissState, | ||
directions = directions, | ||
background = { background(offset) }, | ||
dismissContent = { content(isDismissed) } | ||
) | ||
} | ||
state = dismissState, | ||
backgroundContent = { background(/*offset*/) }, | ||
content = { content(/*isDismissed*/) } | ||
) | ||
/* }*/ |
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.
Remove the commented out sections?
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.
Thanks for reminding me about this one, I added it back based on new dismissed state information (progress percentage instead of DP)
Jetsnack sample is using Material 2 instead of Material 3, keeping most of the UI the same as previously. Material 3 is the preferred choice for Material.
This pull request migrates to using M3, as well as fixes the filters screen selection to have a shared element transition to show and hide the dialog.
screen-20240806-144504.2.mp4
It also fixes build issues some machines were experiencing, where there is a mismatch in JVM versions by setting
jvmToolchain
version.