Fixed
Status Update
Comments
js...@google.com <js...@google.com>
lp...@google.com <lp...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes: b/307694651
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/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/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.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
M 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/3046833
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes:
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/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/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.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
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
nj...@google.com <nj...@google.com> #3
Divider seems like a good candidate to support Dp.Hairline, but I think it might need to be determined on a case by case basis. I could imagine it may not make sense to support Dp.Hairline for all composables/modifiers.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit efe6ccf3faccdd64c6d71b51cc35194d53e36d59
Author: Nader Jawad <njawad@google.com>
Date: Wed Aug 25 10:41:55 2021
Update Divider to respect Dp.Hairline
Relnote: "Updated Divider composable to
respect Dp.Hairline for the thickness parameter
to support drawing single pixel dividers
regardless of display density."
Fixes: 196840810
Test: Added test to DividerUiTest
Change-Id: I16ffb642eda86c17b65f56249686ffe67082ffe5
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/DividerUiTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Divider.kt
https://android-review.googlesource.com/1809156
Branch: androidx-main
commit efe6ccf3faccdd64c6d71b51cc35194d53e36d59
Author: Nader Jawad <njawad@google.com>
Date: Wed Aug 25 10:41:55 2021
Update Divider to respect Dp.Hairline
Relnote: "Updated Divider composable to
respect Dp.Hairline for the thickness parameter
to support drawing single pixel dividers
regardless of display density."
Fixes: 196840810
Test: Added test to DividerUiTest
Change-Id: I16ffb642eda86c17b65f56249686ffe67082ffe5
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/DividerUiTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Divider.kt
Description
It'd be nice if
Divider
supportedDp.Hairline
. In its current implementation, the divider becomes invisible ifDp.Hairline
is used.I'm currently working this around by manually calculating
1px
indp
:I'd also like to call it out that it feels weird to have
Dp.Hairline
globally available, only to realize that it's up to Composables to manually support it(?). From what I understand, onlyBorderStroke
andModifier.border
account for hairlines inv1.0.1
.