Android Edittext Upper Case Alphanumeric Keyboard
I have an EditText and it should display alphanumeric keyboard (both letters and numbers visible on keyboard). Letters must be upper case. What attributes should I set for EditText
Solution 1:
try inputType = textVisiblePassword|textCapCharacters
<EditTextandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:inputType="textVisiblePassword|textCapCharacters" />
Solution 2:
When you have android:inputType="textCapCharacters"
, you will have alphanumeric keyboard as you see in these pictures:
You can change keyboard style in settings of your phone. User can also set keyboard so that it is invisible at all. But you can make custom keyboard. This question may help you: How can you make a custom keyboard in Android?
Solution 3:
You can android:digits property to restrict other text
android:inputType="textCapCharacters"android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "
Post a Comment for "Android Edittext Upper Case Alphanumeric Keyboard"