Android Question capitalize all characters...problem

mw71

Well-Known Member
Licensed User
Longtime User
i test the follow Code, but it does not work
Code:
lbl_call.InputType=Bit.Or(lbl_call.INPUT_TYPE_TEXT,4096)
(lbl_call is an EditText, Generate by Designer, Dim in Globals)

what am I doing wrong?
 
Have you tried stringUtils?
 
Upvote 0
No,
I do not know how to deal with this problem.
I use it so far (only) for MeasureMultilineTextHeight and LoadCSV2
 
Upvote 0
to capitalize a string use the ToUpperCase method of the string object.
to achieve what you need, use it inside the ValueChanged
 
Upvote 0
on this possibility I have already thought, but it is not a "clean" solution.
I find it better, if the keyboard is set to upper-case letters by the Code.
 
Upvote 0
According to this old thread (2012), user @Smee was having issues but realized that
I had mistakenely initialised the text box earlier which seems to have stopped it working properly
.
 
Upvote 0
thanks for the Answer,

unfortunately I do not understand what he did exactly.
I Initialize the EditText (only once) in which I load it because it was created with the designer.
I can not make any adjustments to this before.
 
Upvote 0
I the EditText was added through a Designer Layout you SHOULD NOT initialize it!!
You just need to have it dimed in the appGlobals sub, and for that, you use the "generate members" in the designer's tools
 
Upvote 0
I the EditText was added through a Designer Layout you SHOULD NOT initialize it!!
You just need to have it dimed in the appGlobals sub, and for that, you use the "generate members" in the designer's tools
that's what I'm exactly doing!
I load it whith the complete Layout.
If I initialize it and set it before (which is not correct!), it would be reset by loading the layout again

so I do not understand what Smee does. Do he creates it in the code or was the error at other place
 
Upvote 0
You may have to post a project that can reproduce the issue.
 
Upvote 0
here a small test project. I hope it helps.
In the field Call (dim as lbl_Call), the keyboard is only to enter uppercase letters.
(CapsLock should be activated)
 

Attachments

Upvote 0
CapsLock is activated. I'm using B4A 7.3, my target was API Level 24, Intel Atom (x86) CPU/ABI. The only way I could circumvent the capitalization was by picking a auto-corrected/suggested word that includes lower case characters.
 

Attachments

  • upload_2017-9-10_16-18-7.png
    upload_2017-9-10_16-18-7.png
    40.8 KB · Views: 525
  • upload_2017-9-10_16-18-50.png
    upload_2017-9-10_16-18-50.png
    43.4 KB · Views: 595
Upvote 0
thanks for Test/scrennshots

i Test with Motorola/Android 6.x and Samsung/Android 5.x Device, not in Emulator.
Is there a difference (o.k., other API Level, but it was add in API Level 3)??
 
Upvote 0
Running the app via B4A-Bridge on a Moto-X (XT1058) running Android 5.1 (Using API22), the CapsLock is on.
 
Upvote 0
Back
Top