Android Question EditText to accept only Alphabets between A-Z

Anser

Well-Known Member
Licensed User
Longtime User
Hi,

I have an EditText. It is supposed to accept only Upper Case Alphabets between A and Z

I have used the following code to make the Keyboard appear with Capital Letters.

B4X:
IME1.SetLengthFilter(fletAlphabet.EditText,2) 'This will limit the total length to 2 digits
fletAlphabet.EditText.InputType = Bit.Or(fletAlphabet.EditText.INPUT_TYPE_TEXT , 4096)      'set as all capital letters

Unfortunately, I understand that the user still has the option on the keyboard to change it to lower case alphabet. The user also has the option to type any numbers too.

Is there any way to control this ie the user should key in only alphabets between A and Z that too uppercase.

Any help will be appreciated.

Regards
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top