question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TextInputLayout] Error text overlaps outline box

See original GitHub issue

Description:

When using the Widget.MaterialComponents.TextInputLayout.OutlinedBox style, the error text overlaps with the outline box:

image

Expected behavior:

It needs a little more top padding.

Source code:

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/text_input_username"
    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:hint="@string/login_email"
    app:layout_constraintBottom_toTopOf="@id/text_input_password"
    app:layout_constraintEnd_toStartOf="@id/guideline_end"
    app:layout_constraintStart_toEndOf="@id/guideline_start"
    app:layout_constraintTop_toBottomOf="@id/text_welcome_back">

    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/edit_username"
        android:inputType="textEmailAddress"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>

Android API version: 29

Material Library version: 1.1.0

Device: Emulator (Pixel 3A)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
rohithThammaiahcommented, Apr 10, 2020

Even I am facing the same issue in 1.1.0, can I set the padding programmatically for now?

0reactions
leticiarossicommented, Feb 27, 2020

We did a bunch of improvements for text fields (including fixes to the error behavior) that are in most recent alphas and will appear in the next stable!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextInputLayout with OutlinedBox stroke overlaps the hint
In any case use MaterialAutoCompleteTextView or AutoCompleteTextView instead of androidx.appcompat.widget.AppCompatAutoCompleteTextView (there ...
Read more >
Textinputlayout With Outlinedbox Stroke Overlaps ... - ADocLib
Description: When using the Widget.MaterialComponents.TextInputLayout.OutlinedBox style the error text overlaps with the outline box: image. Expected. Change to ...
Read more >
TextInputLayout | Android Developers
Returns the error message that was set to be displayed with setError(CharSequence) , or null if no error was set or if error...
Read more >
TextInputLayout Styling - Medium
Change default outline border color for TextInputLayout. Styling of labels, errors and helper text separately from the input text.
Read more >
Android TextInputLayout Example | DigitalOcean
Rule of Thumb : TextInputLayout should wrap TextInputEditText instead of the normal EditText. Reason? TextInputEditText is a sub-class of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found