[TextInputLayout] Invisible box outline on empty text and Suffix ruining box
See original GitHub issueDescription: Box outline doesn’t appear when focused with empty text : Unfocused Focused Focus with text Also in errors
Another issue is that suffixes and trailing icons overlap the stroke: And my calendar’s trailing icon disappears on error even though it’s still clickable
Expected behavior: For the outline to appear even with empty text and errors. And my trailing icon to still be visible on error.
Source code: A snippet of one of my fields:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/add_diameter_lay"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:hint="@string/tree_diameter"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/add_height_lay"
app:suffixText="@string/meter">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/add_diameter"
android:textAlignment="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:textSize="14sp"
android:imeOptions="actionDone"/>
</com.google.android.material.textfield.TextInputLayout>
Android API version: API 29
Material Library version: ‘com.google.android.material:material:1.2.1’
Device: Pixel 2 api 30 emulator and my HTC 10 android 8.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why does my TextInputLayout's outLine box doesn't appear?
i want to wrap my edit text with outline ...
Read more >Transparent Box Above The Task Bar
Hello, I have been getting a transparent box above my task bar. Which makes that region unclickable. I am unable to find any...
Read more >mozilla-central: pushlog
Skip four bytes when we hit a zero length box, r=kentuckyfriedtakahe ... Bug 1134126 - add 'alt text' for the empty link using...
Read more >Support for DHCPv6 (RFC 3315) [36949085] - Issue Tracker
Android does currently not support DHCPv6 as defined by RFC 3315. This results in an incomplete IPv6 implementation, as it will not act...
Read more >Notes, Lists, To-do, Reminders v2.0 (0024) (Pro).apk
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to ...
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
@Doomski99 I had the same issue and fixed it with the help of this answer: https://stackoverflow.com/questions/64596156/boxstroke-with-material-outline-box-doesn´t-work
Basically, you should check if you’re setting “android:background” in your main style, because the OutlineBox will use that value for the container border. And because the Activity background is the same color, you can’t see anything.
Really, is that a “Fixed” ?? I need to have a black background, and now my TextInoutLayout is invisible without text just because… WHY? And no way to override this color, are you serious?