[TextInputLayout] setting endIconMode makes hint disappear
See original GitHub issueDescription: To display my custom icon correctly on the right side (app:endIconDrawable="@drawable/ic_drop_down"
) - it is necessary to specify app:endIconMode="custom"
. However, adding this parameter entails a situation where the text from android:hint=
is not shown for some reason.
Expected behavior:
Source code:
<com.google.android.material.textfield.TextInputLayout
android:layout_width="74dp"
android:layout_height="wrap_content"
app:endIconDrawable="@drawable/ic_drop_down"
app:endIconMode="custom"
app:endIconTint="@color/grey"
app:expandedHintEnabled="false"
app:hintAnimationEnabled="false"
app:startIconDrawable="@drawable/ic_flag_loading"
app:startIconTint="@null">
<com.google.android.material.textfield.TextInputEditText
android:clickable="false"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:hint="Country"
android:inputType="none" />
</com.google.android.material.textfield.TextInputLayout>
Android API version: 32
Material Library version: 1.4.0
Device: Redmi 9 (12.0.2) + emulator
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Disable/Remove floating label hint text in TextInputLayout XML
1 Set android:hint on TextInputLayout to a space _ character, ... it makes your hint gone perfectly in your textInputLayout, because if you...
Read more >[TextInputLayout] "clear_text" end icon is visible for all fields ...
I found a workaround through BindingAdapters where every time I set a new text value to my EditText I immediately disappear the icon...
Read more >TextInputLayout | Android Developers
Returns the text color used by the hint in both the collapsed and expanded states, or null if no color has been set....
Read more >Material Design Edit Text | Android Studio Tutorial - YouTube
My Online Courses ⭐Discount Coupon: LAUNCH-STEVDZA-SANhttps://stevdza-san.com Wanna become a member?
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
Thanks for the sample app! I managed to reproduce it. A fix is on its way. : )
@hunterstich Hi 😃
Please confirm the fact that you also reproduce the situation with this bug when running the code, the link to which I sent you above.