I have an EditText which has a hint field saying "Please enter a number". The IME keyboard that I want is that of type number ie. only numbers are allowed!
The problem is if I use the following in the xml layout :
<EditText>
...
android:inputType="number"
android:hint="Please Enter a 10 digit number"
</EditText>
the hint will not be displayed as only numbers are allowed in the EditText.
How to implement a solution that has both : 1. A hint in words/string 2. Input allowed type(IME keyboard) of type number ?
EDIT
Yes, I am using gravity and singleLine attributes and by seeing the comments I guess its because of a known bug in the SDK. I was testing it on 2.3 ver phone.