Status Update
Comments
ap...@google.com <ap...@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
ca...@google.com <ca...@google.com> #3
I added a rememberSwipeableState
function to easily create and remember a SwipeableState
with the default animation clock. That should work perfectly for your usecase.
bl...@gmail.com <bl...@gmail.com> #4
Regression in material3: the function is now marked internal. Please re-open.
ma...@google.com <ma...@google.com> #6
Thanks for your feedback. We are looking into the ways of improving the current Mosidifer.swipeable, it has a number of critical bugs and we don't want to publish it as-is in material3. Stay tuned
ke...@gmail.com <ke...@gmail.com> #7
I would like to add one thing (if it's not planned in the new swipeable() yet).
Right now, if you add an anchor, lets say 0..100 then it works as expected if you swipe from left (0) to right (100). However when doing the opposite swipe (from right 100 to left 0), instead of just not doing anything, swipeable shows the "overscroll" (or rather "overstretch") effect and consumes the scroll events if it's located in a horizontally scrollable container.
For example, let's say I want to put swipeable elements inside of the drawer. I want to be able to swipe to the right to "remove" the elements but I also want to be able to close the drawer by swiping to the left. Right now the drawer is impossible to close by swiping to the left. There needs to be some kind of a flag to disable this default behavior and to hint the swipeable to not consume scroll events in this and similar cases.
Description
Currently creating a
SwipeableState
involves some boiler-plate:SwipeableState
AnimationClockObservable
is and how I procure one.remember
it.A factory function producing this for me would be very convenient.