Status Update
Comments
ma...@google.com <ma...@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
ro...@veeva.com <ro...@veeva.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
ro...@veeva.com <ro...@veeva.com> #4
Any feedback from the design POC?
di...@google.com <di...@google.com> #5
Thanks for looping me in!
Shalom is correct. To meet accessibility requirements we must ensure 48x48 touch targets for each element in the picker. With 7-days (thus 7 columns) that translates to 336dp wide and then there is an additional added left/right 12dp equaling 360dp total.
There are multiple views– including the date-input (non picker) format for screens with not enough real-estate.
On small screens, such as mobile, a full-screen modal date-picker is recommended to increase readability and touch target size. It can cover the entire screen on small screens. The full-screen picker must also ensure the minimum 48x48dp touch-targets so won't work for scenarios below 360dp wide. I will bring the idea past a few others as well on possibly enforcing full-screen under these strained viewports and what the logic might be.
In the meantime, as our guidelines do lean in that direction (full-screen for strained mobile experiences), that would be my recommendation, but the language could be more explicit.
ro...@veeva.com <ro...@veeva.com> #6
Hi #5, thank you for your reply. I have two comments:
- What about landscape mode? Currently it's completely broken (see image attached)
- Will this 48x48 touch target be enforced also for the
version? I hope so, because it's going to be confusing to have 2 different looks depending if your app is using Compose or classic Views, beside the fact that Android Material Component currently doesn't meet the accessibility requirements.Android Material Component
di...@google.com <di...@google.com> #7
No problem!
- Let me circle back on that to confirm, but I believe the Landscape mode follows the same logic to distill to direct input mode or full-screen instead of this modal in your screenshot.
- Yes the 48x48dp touch target is the new accessible requirement that all platforms will need to meet.
da...@bulder.no <da...@bulder.no> #8
Basically, with a small screen size and high text sizes and high screen zoom the "OK" and "Cancel" buttons goes off the screen, making them nearly impossible to click for the users that need high sizes. See attached screenshot.
Emulator specs:
320dp*640dp
720px*1280px
ar...@fara.no <ar...@fara.no> #9
Basically, with a small screen size and high text sizes and high screen zoom the "OK" and "Cancel" buttons goes off the screen, making them nearly impossible to click for the users that need high sizes. See attached screenshot.
"Cancel" and "OK" buttons are not visible also when you increase font size to 200% and display size to 320dp width (see attachment)
This violates WCAG guildelines and Google's own guidelines
Tested on Pixel 7 Pro emulator API 34
androidx.compose.material3:material3:2023.10.00
sg...@google.com <sg...@google.com> #11
For the "OK" and "Cancel" issue, you can add a Modifier.weight
to the DatePicker
in the DatePickerDialog
as a temporary workaround. I'm going to push a fix that will do that internally inside the DatePickerDialog
and will work for nesting a DatePicker
or DateRangePicker
.
DatePickerDialog(
onDismissRequest = {...},
confirmButton = {...},
dismissButton = {...}
) {
DatePicker(state = datePickerState, modifier = Modifier.weight(1f))
}
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit f09ae412b90caf84bc36b55b0d4ef75b6b6503a8
Author: Shalom Gibly <sgibly@google.com>
Date: Wed Feb 14 17:03:33 2024
Ensure buttons visibility at the DatePickerDialog
Wrap the content with a Box and Modifier.weight = 1 to ensure any
confirm or dismiss buttons are visible when the dialog wraps a
DateRangePicker, or when large fonts are displayed on smaller screens.
Bug: 325107799
Bug: 277768544
Test: Verified screenshot tests and manual tests
Relnote: "Ensure that the DatePickerDialog displays its buttons when
nesting a DateRangePicker or when displaying any type of date picker on
small screens with larger fonts."
Change-Id: Ie4758e82b94eb2d5e448a973c550302ff1601f3f
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/DatePickerDialog.android.kt
se...@google.com <se...@google.com> #13
Hi Christian. Since Dillon is on leave do you mind forwarding this to the appropriate designer, thanks!
ch...@google.com <ch...@google.com> #14
Thank you JosÄ—. There are a couple of related scaling issues which I propose we look at all together. For the moment I am assigning this to ticket to Andrew, and included May in CC for awareness.
se...@google.com <se...@google.com> #15
Hi Andrew, do you gave an update on guidance here?
an...@google.com <an...@google.com> #16
Hi Christian, connecting to you as I believe you are currently looking into the 360dp width layouts. Please feel free to re-assign or reach out if there's anything I can do to help. Thank you!
ch...@google.com <ch...@google.com> #17
We are currently working on general layout updates to the date picker, as we will most likely need to support screen width up to 320dp.
Please stay tuned.
Description
Jetpack Compose version: 1.5.0-alpha02
Jetpack Compose component used: androidx.compose.material3
Android Studio Build: Android Studio Electric Eel | 2022.1.1 Patch 2
Kotlin version: 1.8.10
The
DatePickerDialog
has a fixed width of 360dp, which means that it cannot have any padding on devices with a width of 360dp. This issue is not present in theMaterialDatePicker
from the Material Component library (please refer to the attached screenshots for a comparison).Relevant source code references:https://github.com/androidx/androidx/blob/c830219ac8ec895fd660ed2a3c073ca1a6ebaf88/compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/DatePickerDialog.android.kt#L83
https://github.com/androidx/androidx/blob/869fe1f6c4151f742cfba5ccd327891dea582ca3/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/tokens/DatePickerModalTokens.kt#L29
Steps to Reproduce or Code Sample to Reproduce: