This may seem counter-intuitive but is there a way to disable or remove the floating label hint in TextInputLayout
? The reason I want to use TextInputLayout>
I've tried all of answers, but non of them are working now (specifically for com.google.android.material:material:1.1.0-beta01). Even if we make changes to EditText addition logic in TextInputLayout, we have empty space on top of field that blanking half of text and hint. Now I have a solution for the problem. Main thing is a padding in EditText, as mentioned in material.io:
It allows us to implement a 'SearchView'-like view with search icon and text deletion button without any ugly "magic" with custom views