Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add watermark in android widget EditText?

Tags:

Please provide the implementation of watermark text in EditText widget of android,even after Googling it, but cannot find proper solution!

like image 918
saiket Avatar asked May 11 '11 10:05

saiket


1 Answers

If by "watermark text" you mean the text which appears in the field when it is empty, then use the attribute android:hint="My Text" in the layout or programmatically call setHint( "My Text" ) on your EditText object.

like image 100
Mark Allison Avatar answered Oct 12 '22 19:10

Mark Allison