Status Update
Comments
ra...@gmail.com <ra...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
sg...@google.com <sg...@google.com>
ma...@google.com <ma...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
ra...@gmail.com <ra...@gmail.com> #4
yes, i am using Modifier.weight for Slider, i don't know why it crash on OnePlus phone
ra...@gmail.com <ra...@gmail.com> #5
Here is a example code of my slider controller
Row(Modifier.fillMaxWidth()) {
// Some icon buttons here
Slider(
modifier = Modifier.weight(1f)
//...
}
// Other icon buttons here
}
When exiting the horizontal screen state or entering the picture-in-picture mode, the above exception will be caused, and it only happens on OnePlus phone
ma...@google.com <ma...@google.com> #6
Thanks I'll add a fix for parents with width 0.dp maybe it something that only happens briefly and then it measures something reasonable. Can you share the exact model/OS?
ra...@gmail.com <ra...@gmail.com> #7
OnePlus 7/OnePlus 8
I don't have any specific phone to test,it's the feedback from my users. After the simulator test, I guess it's the change of density?
At present, I use BoxWithConstraints to wrap the Slider. And check the maximum width of the constraint, and it will only be displayed when the maximum width is above 40dp, which temporarily fixes the exception.
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 76f24353f136570d95e80840a44d6faf67383971
Author: Mariano Martin <marianomartin@google.com>
Date: Tue May 10 16:01:23 2022
Allow slider parent to have 0 width
Fix: 231707291
Test: added slider_zero_width
Change-Id: Idb144788fd8e45dd651d211c8093fc53be39a0d1
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Slider.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/SliderTest.kt
Description
Jetpack Compose version: 1.2.0-alpha07 Jetpack Compose component used: material3
Use Slider with zero width constrants, then change the density, the Slider might causes app crash:
Here is a simple code to reproduce that:
Just drag the slider, it will crash very soon