Status Update
Comments
ma...@google.com <ma...@google.com> #3
Thanks for the report!
se...@google.com <se...@google.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
se...@google.com <se...@google.com> #5
so...@google.com <so...@google.com> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
ap...@google.com <ap...@google.com> #7
Branch: androidx-master-dev
commit 9e43642ea25a9c3f3a63cc7ddd6ef7eafc6348f0
Author: Anastasia Soboleva <soboleva@google.com>
Date: Wed Aug 12 10:10:17 2020
Make placeholder animated and label optional
Before this change label was a required slot API. But often label is not needed, and having it non-optional sends a wrong signal. With this change label is optional similar to other slots inside material text fields.
Placeholder animates on focus/unfocus as per MD specs.
Test: material tests passed + checked the demo
Fixes: 161519460
Bug: 162234081
Relnote: "Label became an optional parameter inside TextField and OutlinedTextField"
Change-Id: I267f6ada96a3371aaa99bdaa4007229ab7efddab
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/TextFieldSamples.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/TextFieldImpl.kt
ma...@google.com <ma...@google.com> #8
Assigning to Anastasia for future work or to close
so...@google.com <so...@google.com> #9
We now provide both String
and TextFieldValue
overrides in both material and foundation text fields.
Description
Compose: dev14
The current API of
TextField
requiring aTextFieldValue
promotes developers duplicating state inside a composable.The common code is something similar to this:
Developers have express that they don't feel like the selection state (etc) of the TextField is appropriate state to hoist to a parent (e.g. a ViewModel).
We should provide primitives overrides for
TextField
similar to the Material TextField options to allow developers to express this more simply: