Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
at...@gmail.com <at...@gmail.com> #2
Related to
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Shalom Gibly <
Link:
Date pickers Locale support
Expand for full commit details
Date pickers Locale support
This change improves how the DatePicker and DateRangePicker handle
locales when a Locale that was set by the date picker's state wasn't
consistently applied to all its parts, leading to potential
inconsistencies in things like date formatting, weekday names, the
first day of the week, etc.
The DatePickerState and the DateRangePickerState were modified to
include and expose a Locale value that can be used by the various parts
of the UI.
There are two ways to create the state:
- Using remember functions: This will default to your device's locale
and is the recommended way.
- Using DatePickerState or DateRangePickerState directly: This allows
you to specify a custom Locale that will be applied most of the date
picker parts, but not all. Note that the title and the headline's
default text will need to be adjusted to support a specific Locale in
case a specific one is set.
Fixes: 326490763
Fixes: 321657276
Test: additional date picker and input tests
Relnote: "Updates to the date pickers to ensure consistent Locale
usage throughout the DatePicker and DateRangePicker when setting a
Locale directly through a DatePickerState or a DateRangePickerState.
Note that when setting Locales directly to the state, it's up to you to
ensure that the title and headline texts are localized accordingly, as
their default text will still be applied according to the default
platform Locale."
Change-Id: I370735477b6adae8628fb967b6aa6c6138216883
Files:
- M
compose/material3/material3/api/current.txt
- M
compose/material3/material3/api/restricted_current.txt
- M
compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/DatePickerSamples.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/DateInputTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/DatePickerScreenshotTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/DatePickerTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/DateRangeInputTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/DateRangePickerScreenshotTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/DateRangePickerTest.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateInput.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateRangeInput.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateRangePicker.kt
Hash: 2579989ac2b9c281d530ffbf1d1bd9d89fb91270
Date: Mon Sep 30 10:51:27 2024
Description
Jetpack Compose version: 1.2.0-alpha12
Jetpack Compose component used: PullToRefreshContainer
Android Studio Build:
Steps to Reproduce or Code Sample to Reproduce:
The indicator is visible on top of the TabRow, see screenshot. I have tried to set the zIndex of the Indicator to -1f and the zIndex of TabRow to 1f but didn't work. What am I missing?