Android Question Disable Special Characters

vdudukov

Member
Licensed User
Longtime User
Hello everybody.

Is it possible to disable all special characters, and use only alphabet and numbers, without some custom keyboard? I do not need comma or any other symbol, only alphabet and numbers.

Thanks!:)
 

Theera

Well-Known Member
Licensed User
Longtime User
Please study this
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
You can try this code:
B4X:
Dim kb As IME
Dim EditText1 As EditText
 
kb.Initialize("")
EditText1.Initialize("")
 
Activity.AddView(EditText1, 0dip, 50dip, 100%x, 40dip)
 
kb.SetCustomFilter(EditText1, EditText1.INPUT_TYPE_TEXT, "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890")
 
Upvote 0

vdudukov

Member
Licensed User
Longtime User
You can try this code:
B4X:
Dim kb As IME
Dim EditText1 As EditText

kb.Initialize("")
EditText1.Initialize("")

Activity.AddView(EditText1, 0dip, 50dip, 100%x, 40dip)

kb.SetCustomFilter(EditText1, EditText1.INPUT_TYPE_TEXT, "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890")

Thank You. This code is great :)
 
Upvote 0
Top