Status Update
Comments
jo...@google.com <jo...@google.com> #2
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
ph...@lu.ma <ph...@lu.ma> #3
Thanks for the context and quick response!
Yeah, progressBetweenVisibleAndInvisible
sounds like good API, at least for my needs.
I tried taking 1.3 version of ModalBottomSheetLayout
as base, and indeed it's using some of the internals: I'm missing anchors
and minBound
for PreUpPostDownNestedScrollConnection
. So I had to copy Swipeable
too..
It is on our to-do-list, but we are working on some other high-priority tasks at the moment.
Is it correct that I shouldn't expect it in 1.4.0 release?
jo...@google.com <jo...@google.com> #4
Yep, it won't be in 1.4.0.
ro...@osome.com <ro...@osome.com> #5
This progress can be used not only this case. Designers can create a lot of beautiful UI cases, for example, make parallax effect of background, change color of another contents or something another different things, which I can't imagine right now.
And I faced with the same problem during migration on to compose 1.4
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 762bbc3cea2a9bcfb6fae34e71c6bb8da917f43c
Author: Jossi Wolf <jossiwolf@google.com>
Date: Mon May 15 11:50:25 2023
[M2] Expose AnchoredDraggable components' progress
Fixes: 271169225
Fixes: 276375124
Fixes: 276776071
Fixes: 270066861
Relnote: BottomSheetState, ModalBottomSheetState and BottomDrawerState now expose a progress property indicating the progress between the current (settled) anchor and the closest anchor in the swipe direction.
Test: AnchoredDraggable tests
Change-Id: I1b31727b4f56df890e336bea9f4de526733aaacc
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/AnchoredDraggable.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomSheetScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 00a9792162b32f60b64eeb5617fd46da749be323
Author: Jossi Wolf <jossiwolf@google.com>
Date: Fri May 12 17:08:38 2023
[M2] AnchoredDraggable Progress API
Improves AnchoredDraggable's progress API to match Swipeable's behavior. The progress is now exposed as the fraction of the current offset between the current (settled) anchor and the closest anchor in the swipe direction.
In contrast to the targetValue, the closestValue does not consider the thresholds.
Test: anchoredDraggable_closestValue, existing progress tests
Fixes: 270066861
Change-Id: I651e06cb34e914a63e13df851b27087d3bbb4257
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/anchoredDraggable/AnchoredDraggableStateTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/AnchoredDraggable.kt
[Deleted User] <[Deleted User]> #8
ph...@gmail.com <ph...@gmail.com> #9
I also expected to see it in 1.5.0-beta02, but it's not there. It's only gonna be available in 1.6?
pr...@google.com <pr...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.6.0-alpha01
androidx.compose.material:material-android:1.6.0-alpha01
ju...@google.com <ju...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.5.0-beta03
androidx.compose.material:material-android:1.5.0-beta03
na...@google.com <na...@google.com> #12
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.wear.compose:compose-material-core:1.2.0-rc01
androidx.wear.compose:compose-ui-tooling:1.2.0-rc01
Description
System
ModalBottomSheet
hides scrim quite early after you start swiping - I guess it indicates that sheet is gonna be dismissed at this point.I prefer to have a progressive scrim alpha - it drops smoothly to zero when the sheet is completely closed.
In Compose 1.3.0 I was using
ModalBottomSheetState.progress
to calculate scrim alpha depending on swipe progress.Looks like
SwipeableV2State
API is different fromSwipeableState
at this point. I guess that I can useModalBottomSheetState.currentValue
/ModalBottomSheetState.targetValue
instead ofSwipeableState.progress.from
/SwipeableState.progress.to
, but I still needSwipeableState.progress.friction
which seems likeSwipeableV2State.progress
now.Could you make it publicly available with
ModalBottomSheetState.progress
?