How to reduce EditText
Hint size?
Using onFocusChanged() listener for changing hint font size is also an option, as addTextChangeListener() won't trigger when user clicks on text field, and blinking cursor will resize to hint font. Also, unlike with TextChangeListener, there is no need to set initial hint font size separately.
You only need to change the android:textSize attribute for the TextInputEditText for the hint size to change.
You can do it by setting a size in the string recource.
For example:
<string name="edittext_hint"><font size="15">Hint here!</font></string>
then in your XML just write
android:hint="@string/edittext_hint"
This will resault in a smaller text for the hint but the original size for the input text.
Hopes this helps for future readers
You can reduce the font size on the EditText
- that will reduce the size of the hint
as well. i.e. android:textSize="16sp"
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