Obsolete
Status Update
Comments
an...@google.com <an...@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
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e386f97dd769da18d9f3103958714e43d797219f
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Fri Jan 31 17:32:33 2020
Monthly button refactoring
- Removes string overload for Button
- Replaces ButtonStyle with distinct functions, the following is the
migration strategy:
ContainedButtonStyle -> Button
OutlinedButtonStyle -> OutlinedButton
TextButtonStyle -> TextButton
Custom ButtonStyle -> Any / which ever is most semantically related
Now that each function takes the same parameters, and there are no
overloads, there is no more large separation between layers - extra
customization is just a matter of supplying more parameters, instead of
needing to find overloads / copy and paste parameters from high level
styles into the base ButtonStyle.
Also adds sample for Modifiers so the samples won't break when API
changes like this are made.
Bug: b/146478620
Bug: b/146482131
Bug: b/146346551
Test: ButtonTest
Change-Id: If63ab32bd3f12050a2d2f4b8c0cb044bc7144a6b
Relnote: "Replaced ButtonStyle with distinct functions and removed text (string) overload. See updated samples for usage information."
M compose/compose-runtime/integration-tests/samples/src/main/java/androidx/compose/samples/EffectSamples.kt
M compose/compose-runtime/integration-tests/samples/src/main/java/androidx/compose/samples/ModelSamples.kt
M compose/compose-runtime/integration-tests/samples/src/main/java/androidx/compose/samples/RecomposeSamples.kt
M ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/ViewInCompose.kt
M ui/ui-core/integration-tests/samples/build.gradle
A ui/ui-core/integration-tests/samples/src/main/java/androidx/ui/core/samples/ModifierSamples.kt
M ui/ui-core/src/main/java/androidx/ui/core/Modifier.kt
M ui/ui-framework/integration-tests/framework-demos/src/main/java/androidx/ui/framework/demos/SemanticsL1.kt
M ui/ui-material/api/0.1.0-dev05.txt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_0.1.0-dev05.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_0.1.0-dev05.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ButtonActivity.kt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/CustomShapeActivity.kt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/TabActivity.kt
M ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/RallyAlertDialog.kt
M ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/RallyCards.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/AlertDialogSample.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/ButtonSamples.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/DrawerSamples.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/SnackbarSample.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/Button.kt
M ui/ui-material/src/main/java/androidx/ui/material/Snackbar.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertExistsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CustomActivityTest.kt
https://android-review.googlesource.com/1222411
Branch: androidx-master-dev
commit e386f97dd769da18d9f3103958714e43d797219f
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Fri Jan 31 17:32:33 2020
Monthly button refactoring
- Removes string overload for Button
- Replaces ButtonStyle with distinct functions, the following is the
migration strategy:
ContainedButtonStyle -> Button
OutlinedButtonStyle -> OutlinedButton
TextButtonStyle -> TextButton
Custom ButtonStyle -> Any / which ever is most semantically related
Now that each function takes the same parameters, and there are no
overloads, there is no more large separation between layers - extra
customization is just a matter of supplying more parameters, instead of
needing to find overloads / copy and paste parameters from high level
styles into the base ButtonStyle.
Also adds sample for Modifiers so the samples won't break when API
changes like this are made.
Bug:
Bug:
Bug:
Test: ButtonTest
Change-Id: If63ab32bd3f12050a2d2f4b8c0cb044bc7144a6b
Relnote: "Replaced ButtonStyle with distinct functions and removed text (string) overload. See updated samples for usage information."
M compose/compose-runtime/integration-tests/samples/src/main/java/androidx/compose/samples/EffectSamples.kt
M compose/compose-runtime/integration-tests/samples/src/main/java/androidx/compose/samples/ModelSamples.kt
M compose/compose-runtime/integration-tests/samples/src/main/java/androidx/compose/samples/RecomposeSamples.kt
M ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/ViewInCompose.kt
M ui/ui-core/integration-tests/samples/build.gradle
A ui/ui-core/integration-tests/samples/src/main/java/androidx/ui/core/samples/ModifierSamples.kt
M ui/ui-core/src/main/java/androidx/ui/core/Modifier.kt
M ui/ui-framework/integration-tests/framework-demos/src/main/java/androidx/ui/framework/demos/SemanticsL1.kt
M ui/ui-material/api/0.1.0-dev05.txt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_0.1.0-dev05.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_0.1.0-dev05.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ButtonActivity.kt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/CustomShapeActivity.kt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/TabActivity.kt
M ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/RallyAlertDialog.kt
M ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/RallyCards.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/AlertDialogSample.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/ButtonSamples.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/DrawerSamples.kt
M ui/ui-material/integration-tests/samples/src/main/java/androidx/ui/material/samples/SnackbarSample.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/Button.kt
M ui/ui-material/src/main/java/androidx/ui/material/Snackbar.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertExistsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CustomActivityTest.kt
Description
Now, to change the textStyle of the text in a Button, you have to use the Slot API and add your custom Text child to the Button. Example:
Button(onClick = onClick) {
Text(
text = myText,
style = myTextStyle
)
}
As Button has a method override where you can pass text in, can we add a parameter for TextStyle?
Expected:
@Composable
fun Button(
text: String,
textStyle: TextStyle? = null,
modifier: Modifier = Modifier.None,
onClick: (() -> Unit)? = null,
style: ButtonStyle = ContainedButtonStyle()
)
Actual:
@Composable
fun Button(
text: String,
modifier: Modifier = Modifier.None,
onClick: (() -> Unit)? = null,
style: ButtonStyle = ContainedButtonStyle()
)