Status Update
Comments
ma...@google.com <ma...@google.com>
sg...@google.com <sg...@google.com>
sg...@google.com <sg...@google.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
ap...@google.com <ap...@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
sg...@google.com <sg...@google.com>
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.1.0-beta01
za...@yandex.ru <za...@yandex.ru> #5
I’m experiencing an issue with the DateRangePicker in Jetpack Compose Material3.
Issue Description
When using DateRangePicker in DisplayMode.Input, entering the same date in both fields (Start and End) and then clicking on the “Start date” field triggers a validation message:
“Invalid date range input”
This message cannot be dismissed when selecting the same start and end date. It makes it impossible for users to pick a single-day range in input mode.
Expected Behavior
The DateRangePicker should allow selecting the same start and end date without showing a validation error, as a one-day range is a valid selection.
Environment
• Compose Material3 version: 1.3.1
• Android Gradle Plugin version: 8.8.0
• Kotlin version: 2.1.10
• Core KTX version: 1.15.0
• Activity Compose version: 1.10.0
• Compose BOM version: 2025.01.01
Steps to Reproduce
1. Open DateRangePicker in DisplayMode.Input.
2. Enter the same date in both “Start date” and “End date” fields.
3. Click on the “Start date” field.
4. The message “Invalid date range input” appears and cannot be dismissed.
Could you please take a look at this issue? A single-day range should be a valid selection.
Thank you!
sg...@google.com <sg...@google.com> #6
Tested with the latest (e.g. 1.4.0 alpha), and everything works as expected. A single day selection and validation is possible. Also, clicking the start date field after the second one was input works as expected and I don't see a validation error there.
See attached video.
Can you confirm this on the latest library support? Thanks!
Description
DateRangePicker
doesn't allow selecting a range of 1 day (a range starting and ending on the same day). Date range picker fromcom.google.android.material:material:1.8.0
allows 1-day ranges. Another example is the Pixel clock app allows 1-day ranges when pausing alarms. In general this is a valid edge use case.Looks like
DateInputValidator
marks a range like this invalid, but it's unclear if this is on purpose. The code is surrounded with comments that say "Additional validation when the InputIdentifier is for start of end dates in a range input" and "The input start date is after the end date, or the end date is before the start date." which strikes me as something where the intent wasn't to also reject when start date and end date are equal.