I have a scenario, for example, a EditText in acitivity instead of using Textview as a label of it i want to put text "UserName" inside EditText and if user clicks on it. it should disappear and EditText should get empty to enter data in it.
How can I achieve this?
android:hint="username"
put this attribute in EditText
thats it.
onclickListener does not work with EditText items, you'll have to use an OnFocusListener.
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