Reputation: 225
I have tried
editText.setText("");
however I get an error saying "" is not a valid integer. I have also tryed changing the input type to text setting the text to "" than changing the input type back to numbers but I get the same error.
Upvotes: 0
Views: 4889
Reputation: 291
Set the prperties in XML as
android:hint = ""
In Java
editText.setHint("");
Upvotes: 0
Reputation: 2290
Try this:
editText.setText("0", BufferType.EDITABLE); /*// May be unecessary... */
editText.getText().clear();
You may need to set the buffer type to BufferType.EDITABLE first...
Upvotes: 1
Reputation: 2717
In XML use properties
android:hint=""
android:inputType="number"
In code use
.setHint("");
Upvotes: 3
Reputation: 203
You can use an empty string value in res/values/string.xml, like --> < string name:"empty_string">< /string>
Upvotes: 0