D Dey Active Member Licensed User Longtime User Jan 15, 2019 #1 Hi everyone let's see if I can explain what I need to do I have EditText to compile the system uses an external keyboard, I do not know how to make the digitization last, I would like the characters in CAPS if I use IME I have no problems is it possible to intercept the character to capitalize it before the event edittext_TextChanged? Thanks to those who give me a thing
Hi everyone let's see if I can explain what I need to do I have EditText to compile the system uses an external keyboard, I do not know how to make the digitization last, I would like the characters in CAPS if I use IME I have no problems is it possible to intercept the character to capitalize it before the event edittext_TextChanged? Thanks to those who give me a thing
Geezer Active Member Licensed User Longtime User Jan 15, 2019 #2 You could limit the allowed characters to capitals. Something similar to Code: Copy IME.SetCustomFilter( EditText1, EditText1.INPUT_TYPE_TEXT + 4096, "ABCDEFGHIJKLMNOPQRSTUVWXYZ 123456789.") Upvote 0
You could limit the allowed characters to capitals. Something similar to Code: Copy IME.SetCustomFilter( EditText1, EditText1.INPUT_TYPE_TEXT + 4096, "ABCDEFGHIJKLMNOPQRSTUVWXYZ 123456789.")
jimmyF Active Member Licensed User Longtime User Jan 16, 2019 #3 Code: Copy InpTyp.Initialize InpTyp.SetInputType(EditText1, Array As Int(InpTyp.TYPE_CLASS_TEXT, InpTyp.TYPE_TEXT_FLAG_CAP_CHARACTERS)) 'uppercase letters Upvote 0
Code: Copy InpTyp.Initialize InpTyp.SetInputType(EditText1, Array As Int(InpTyp.TYPE_CLASS_TEXT, InpTyp.TYPE_TEXT_FLAG_CAP_CHARACTERS)) 'uppercase letters
D Dey Active Member Licensed User Longtime User Jan 16, 2019 #4 jimmyF said: Code: Copy InpTyp.Initialize InpTyp.SetInputType(EditText1, Array As Int(InpTyp.TYPE_CLASS_TEXT, InpTyp.TYPE_TEXT_FLAG_CAP_CHARACTERS)) 'uppercase letters Click to expand... Thank you all for the answers Is InpTyp a library? with the soft keyboard IME I have no problems with capital letters I can not get uppercase letters with an external USB keyboard I can convert after _FocusChanged event Upvote 0
jimmyF said: Code: Copy InpTyp.Initialize InpTyp.SetInputType(EditText1, Array As Int(InpTyp.TYPE_CLASS_TEXT, InpTyp.TYPE_TEXT_FLAG_CAP_CHARACTERS)) 'uppercase letters Click to expand... Thank you all for the answers Is InpTyp a library? with the soft keyboard IME I have no problems with capital letters I can not get uppercase letters with an external USB keyboard I can convert after _FocusChanged event
Erel B4X founder Staff member Licensed User Longtime User Jan 16, 2019 #5 You can see the constants values here: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS Code: Copy EditText1.InputType = Bit.Or(EditText1.InputType, 4096) Upvote 0
You can see the constants values here: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS Code: Copy EditText1.InputType = Bit.Or(EditText1.InputType, 4096)
D Dey Active Member Licensed User Longtime User Jan 16, 2019 #6 Erel said: You can see the constants values here: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS Code: Copy EditText1.InputType = Bit.Or(EditText1.InputType, 4096) Click to expand... This with an external keyboard does not work IME.SetCustomFilter (EditText1, EditText1.INPUT_TYPE_TEXT + 4096, "ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890.") This solution also works with an external keyboard Thank you all Upvote 0
Erel said: You can see the constants values here: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS Code: Copy EditText1.InputType = Bit.Or(EditText1.InputType, 4096) Click to expand... This with an external keyboard does not work IME.SetCustomFilter (EditText1, EditText1.INPUT_TYPE_TEXT + 4096, "ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890.") This solution also works with an external keyboard Thank you all
jimmyF Active Member Licensed User Longtime User Jan 16, 2019 #7 I use this class: https://www.b4x.com/android/forum/threads/class-input-type-constants.28091/#post-172330 Then you can use: Code: Copy Dim InpTyp As SLInpTypeConst InpTyp.SetInputType(EditText1,Array As Int(InpTyp.TYPE_CLASS_TEXT,InpTyp.TYPE_TEXT_FLAG_CAP_CHARACTERS)) 'If Multiline EditText1.SingleLine=False Works on all my devices including BlackBerry KeyOne (External keyboard) hth Upvote 0
I use this class: https://www.b4x.com/android/forum/threads/class-input-type-constants.28091/#post-172330 Then you can use: Code: Copy Dim InpTyp As SLInpTypeConst InpTyp.SetInputType(EditText1,Array As Int(InpTyp.TYPE_CLASS_TEXT,InpTyp.TYPE_TEXT_FLAG_CAP_CHARACTERS)) 'If Multiline EditText1.SingleLine=False Works on all my devices including BlackBerry KeyOne (External keyboard) hth