Does Android EditText has input type with clear button?
It should work like html 5 search input type.
just use the android:hint attribute in your EditText. This text shows up when the box is empty and not focused, but disappears upon selecting the EditText box. this should be the accepted answer, +1 for simplicity.
Layout which wraps a TextInputEditText , EditText , or descendant to show a floating label when the hint is hidden while the user inputs text.
There is no internal input-type, but you can customize it to work so. This link might help you: Stack-Overflow: EditText with clear button
If you're using TextInputLayout
that you can use endIconMode
and endIconDrawable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With