Reputation: 435
How can I set a default text in an EditText of android. But I want only an informative text not editable, and when you click in the edit text you can write all you want without having to delete this text.
I want text that is present when the EditText is still empty, but disappears as soon as the user starts to type something.
Thank you.
Upvotes: 1
Views: 73
Reputation: 14810
Add the hint
property for the edittext like this
android:hint="Email"
It sets a Hint text to display when the text is empty.
Upvotes: 3