How do I put text into empty TextView so it goes away when user starts typing? Just like here in StackOverflow under "Tags" field.
Same approach used in GMail client. That will save me some space - no need to create labels..
Throw an android:hint="hint text"
into your EditText
xml tag.
As haphazard said or programatically you can use...
setHint(CharSequence hint)
or setHint(int resId)
.
The equivalent to the resource id in xml would be android:hint="@string/hint_text"
(for example).
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