How can I add a placeholder text to EditText in the class that isn\'t in the XML?
I have the following EditText in my code which will be sh
You have to use the android:hint attribute
In Android Studio, you can switch from XML -> Design View and click on the Component in the layout, the EditText field in this case. This will show all the applicable attributes for that GUI component. This will be handy when you don't know about all the attributes that are there.
You would be surprised to see that EditText has more than 140 attributes for customization.