Closed sabinebarrera closed 2 years ago
Can't it be easily done by wrapping TextInputLayout in another layout?
Can you provide more use cases so we can evaluate if this is a valuable feature to add?
@drchen yes, you could wrapped a MaterialTextView
and TextInputLayout
within ConstraintLayout
but is this efficient? the TextInputLayout
already has this label. As shown in the images I shared above, the use case is when you have a form fields (with many of those) that the user needs to fill when collecting data on the field.
It won't be less efficient than whatever approaches we may need to adopt on the library side.
The existing label behavior is kind of complicated - it collapses and expands according to the focus state. I will be hard to support more flexible positioning of it, and, more importantly, it's not the design intention of it.
Since clients can easily do this on their own, and it's not part of the Material design. I'll close the issue as no-go.
**Is your feature request related to a problem? Yes. Field aliases in a database table can has a long text. This long name get ellipsized but there is no option to specify if you want the
label
for outline TextInputLayout` to be above the box.Describe the solution you'd like Provide style for
floating
labels: XML attribute(s) and setter/getter (s).hintText
from thefloatingLabel
.Describe alternatives you've considered Adding a textView above the
TextInputLayout
but we don't want to deviate from what it is provided by the Android API. It is an overkill and it should be supported.Additional context This is the design we are trying to achieve.
Design Artboard
Screens below show the comparison between our iOS vs Android app:
Implementation Screens
| iOS | Android | | --- | --- | | | | | Check marks show the UI piece for the field alias name | X show the UI piece for the field alias name that is ellipsized |