Fixed
Status Update
Comments
tc...@google.com <tc...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 89251b3129e1895f169dd8df404a420c5785519c
Author: Matvei Malkov <malkov@google.com>
Date: Tue Feb 09 17:35:30 2021
Support enabled parameter is slider and convert it to use SliderColor interface instead.
Slider has enabled/disabled states per spec and we need to support it for component to be stable.
Also, since we add even more color parameters, it is time to convert it to use SliderColors interface.
Fixes: 179793072
Test: added screenshot tests and a11y test for disabled
Change-Id: I6d56b992042f54b63daf4936ef6f6c27319b0498
Relnote: Slider now supports enabled/disabled state
Relnote: Slider custom colors are available now via SliderDefaults.colors() function
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/SliderSample.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SliderScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SliderTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
https://android-review.googlesource.com/1581663
Branch: androidx-main
commit 89251b3129e1895f169dd8df404a420c5785519c
Author: Matvei Malkov <malkov@google.com>
Date: Tue Feb 09 17:35:30 2021
Support enabled parameter is slider and convert it to use SliderColor interface instead.
Slider has enabled/disabled states per spec and we need to support it for component to be stable.
Also, since we add even more color parameters, it is time to convert it to use SliderColors interface.
Fixes: 179793072
Test: added screenshot tests and a11y test for disabled
Change-Id: I6d56b992042f54b63daf4936ef6f6c27319b0498
Relnote: Slider now supports enabled/disabled state
Relnote: Slider custom colors are available now via SliderDefaults.colors() function
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/SliderSample.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SliderScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SliderTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Slider.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 80b5d30138ac6afd462bdf7cb5b4e617d5258395
Author: Anastasia Soboleva <soboleva@google.com>
Date: Sun Feb 07 01:02:06 2021
Add TextFieldColors interface and TextFieldDefaults object.
Rename isErrorValue parameter of text fields into isError.
Fixes: 171305338
Fixes: 179256385
Fixes: 168004067
Test: material tests passed
Relnote: """
- Added TextFieldColors interface to represent different colors used in TextField and OutlinedTextField in different states. For defaut implementation see TextFieldDefaults.textFieldColors and TextFieldDefaults.outlinedTextFieldColors.
- Renamed isErrorValue parameter inside TextField and OutlinedTextField
into isError.
"""
Change-Id: I831f90c3be79452bcaa6dff41d1777298a23ca09
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MaterialTextField.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextFieldSamples.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/TextFieldScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/TextFieldTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
A compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
https://android-review.googlesource.com/1580603
Branch: androidx-main
commit 80b5d30138ac6afd462bdf7cb5b4e617d5258395
Author: Anastasia Soboleva <soboleva@google.com>
Date: Sun Feb 07 01:02:06 2021
Add TextFieldColors interface and TextFieldDefaults object.
Rename isErrorValue parameter of text fields into isError.
Fixes: 171305338
Fixes: 179256385
Fixes: 168004067
Test: material tests passed
Relnote: """
- Added TextFieldColors interface to represent different colors used in TextField and OutlinedTextField in different states. For defaut implementation see TextFieldDefaults.textFieldColors and TextFieldDefaults.outlinedTextFieldColors.
- Renamed isErrorValue parameter inside TextField and OutlinedTextField
into isError.
"""
Change-Id: I831f90c3be79452bcaa6dff41d1777298a23ca09
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MaterialTextField.kt
M compose/material/material/samples/src/main/java/androidx/compose/material/samples/TextFieldSamples.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/TextFieldScreenshotTest.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/TextFieldTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
A compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
Description
Following recent changes to other components (such as
SwitchColors
andButtonElevation
) we use type safe interfaces to represent parameters that change in different states.Currently the color parameters on
TextField
are misleading, as they are modified a lot and used in different places, making it hard to customize parts of the text field, such as having a different error color for the cursor and label. Additionally, emphasis is applied internally meaning that there is no way to opt out / change the alpha applied to certain parts of the text field.We could allow for easier customization and make the API surface more clear with something like:
Happy to help discuss this, but I think the first step is figuring out what all the combination of colors that are used in different states / places in the
TextField
are.