Status Update
Comments
jo...@google.com <jo...@google.com>
ka...@yahooinc.com <ka...@yahooinc.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
[Deleted User] <[Deleted User]> #3
jo...@google.com <jo...@google.com> #4
Hi, the there is no release containing a fix yet. We will update the issue when the fix has been merged and when it has been released.
th...@neugelb.com <th...@neugelb.com> #5
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
mi...@gmail.com <mi...@gmail.com> #7
ri...@gmail.com <ri...@gmail.com> #8
jo...@google.com <jo...@google.com> #9
#7, correct, this commit exposes the the fraction of the current offset in the distance of the current transition. You can access the currentValue
and targetValue
though to determine whether the states.
Also, the state doesn't change immediately when it hits 1, as we can see above. What do you mean?
#8, this fix will be included in the next release, happening soon.
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
Jetpack Compose version: androidx.compose:compose-bom:2023.03.00
Jetpack Compose component used: BottomSheetState
Kotlin version: 1.8.10
I noticed a bug inside the implementation of BottomSheetState. I tried calculating the absolute fractional progress of the BottomSheetState. The desired result would be a function that returns 1f if the BottomSheet is expanded and 0 if it is Hidden, so I could use the BottomSheet in combination with a MotionLayout.
This worked fine, except that the value quickly jumps from 0 to 1 when swiping down and from 1 to 0 when swiping up, which leads to a broken animation in the MotionLayout. So I started printing some outputs.
For generating the output I used:
When I swipe up:
When I swipe down:
There seems to be no possibility to differenciate between
state: Collapsed, progress: 1.0
when swiping up andstate: Collapsed, progress: 1.0
while swiping down, which then leads to the broken animation.In my opinion, the second last rows of the outputs are not correct and should already return the new state.
If this is intended behaviour of course, I would be happy for some feedback on how to get the absolute progress fraction of the Bottom Sheet
Kind regards