Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 76627d4fa38dfeb93252e1bdbcb0b43712f437f7
Author: Shalom Gibly <sgibly@google.com>
Date: Tue Mar 07 14:13:28 2023
Adds support for headless date pickers
- Allow null headline composable at the DatePicker and the
DateRangePicker.
- Draw a Divider between the header part and the calendar/date-input
part only when the title and the headline were null, and when the
showModeToggle was false.
- Since the title part is setting the top padding for the DatePicker,
note that when removing it, the resposibility for setting a reasonable
top padding is on the developer.
Bug: 266132421
Bug: 267194809
Test: updated screenshot tests in the topic
Relnote: "Added support for displaying the date pickers without the
header part. API changes to allow passing a null headline when creating
a date picker. You can now pass null headline, title, and showToggleMode
= false in order to display a headless picker."
Change-Id: Id3f3a800c84c12f7c96a3654e59258933da0ec0b
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateRangePicker.kt
https://android-review.googlesource.com/2475017
Branch: androidx-main
commit 76627d4fa38dfeb93252e1bdbcb0b43712f437f7
Author: Shalom Gibly <sgibly@google.com>
Date: Tue Mar 07 14:13:28 2023
Adds support for headless date pickers
- Allow null headline composable at the DatePicker and the
DateRangePicker.
- Draw a Divider between the header part and the calendar/date-input
part only when the title and the headline were null, and when the
showModeToggle was false.
- Since the title part is setting the top padding for the DatePicker,
note that when removing it, the resposibility for setting a reasonable
top padding is on the developer.
Bug: 266132421
Bug: 267194809
Test: updated screenshot tests in the topic
Relnote: "Added support for displaying the date pickers without the
header part. API changes to allow passing a null headline when creating
a date picker. You can now pass null headline, title, and showToggleMode
= false in order to display a headless picker."
Change-Id: Id3f3a800c84c12f7c96a3654e59258933da0ec0b
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateRangePicker.kt
Description
In general, we want to send state down the hierarchy, and events up. This API takes the state that is passed down and converts it into an event. Since it is not consistent with the general pattern followed in Compose, we should remove it.