I want to make the EditText hint appear in capital case characters without adding an upper case string in the strings file, Any help?
You can add the android:textAllCaps="true" property to your xml file in the EditText. This will enforce the softinput keyboard to appear in all caps mode. The value you enter will appear in Uppercase.
Want to type in ALL CAPS? No problem! Just double-tap the shift key and a blue indicator will light up. You'll know you're in all caps because the letter keys will change to uppercase.
The primary use of a TextInputLayout is to act as a wrapper for EditText(or its descendant) and enable floating hint animations. Rule of Thumb : TextInputLayout should wrap TextInputEditText instead of the normal EditText.
I think this is an example you can try:
myEditText.setHint(getResources().getString(R.string.your_text_in_string).toUpperCase());
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