Hai, I have an Android Program with one text field. I need to display a message inside that textfield when it loads on an emulator. When the user clicks inside that textbox that message should dispappear. For Ex: Please enter name Can any one post some sample code over here...
A:
Just use or call setHint
on the object. Hint text to display when the text is empty.
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18px"
android:gravity="left"
android:hint="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse egestas ullamcorper facilisis." />
Pentium10
2010-07-23 12:29:16
Thanku Pentium10...This is also working
Sanjeev
2010-07-23 12:33:13