Textinputlayout messing up when setting an height
See original GitHub issue<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/username"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/password"
app:layout_constraintVertical_chainStyle="spread_inside"
app:layout_constraintHeight_default="percent"
app:layout_constraintHeight_percent="0.2"
android:hint="ggggggggggggggggg"
android:background="@color/primaryColor"
app:boxStrokeColor="@color/secondaryDarkColor"
app:boxStrokeWidth="10px">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
This is part of a constrained layout, and I have the same issue even if I set the height
of Textinputedittext
to match_parent
; the result is this
If I let the Textinputlayout
’s height
being wrap_content
it works without problems, so I think that it has an issue while scaling, and it doesn’t do it properly
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Android TextInputLayout writing focus issue when height is ...
This TextInputLayout's height is dynamic, as in, the height will grow when more text is being written. So in a case where the...
Read more >TextInputLayout Styling - Medium
Styling of each element of the TextInputLayout. Change the EditText bubble color. Change default outline border color for TextInputLayout.
Read more >TextInputLayout | Android Developers
Returns the placeholder text that was set to be displayed with setPlaceholderText(CharSequence) , or null if there is no placeholder text. int ...
Read more >Android TextInputLayout Using Kotlin With Example
We use android:layout_height=”” attribute to set height of TextInputLayout. We can do it as below –. <TextInputLayout. android ...
Read more >TextInputLayout setError() will not show an error after it is ...
When setError("some text here") is called on a TextInputLayout for the first time, the error is shown properly. If the error is cleared...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @VitKap, thanks for the info.
Unfortunately I guess it’s very difficult for us to keep a complex UX working perfectly when there are too limited spaces for it… It’s not ideal but I would say it’s kind of working as intended…
When you need to make the
TextInputLayout
smaller than 56dp for some reason there is not an easy way to do it. So it is still hapenning but I don’t know if this is a bug or a definition by specs.