Reputation: 69
I want to only text (input) in edittext in App Android.! example: Only type "Text: A-> Z", Not allow number or special character.?
Please give me idea, how should it be done? Thank very much.!
Upvotes: 3
Views: 7319
Reputation: 75788
Try this way,
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
android:inputType="text"
For more info, you may check http://developer.android.com/reference/android/widget/TextView.html#attr_android:digits
Upvotes: 7
Reputation: 1111
I think you can do this by the following attribute in ur xml file.
android:inputType
for more on this see this link:
http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType
i think you should set it like this:
android:inputType="text"
or try this:
Upvotes: 1