Android Question IME Issue

MrKim

Well-Known Member
Licensed User
Longtime User
Correct:
B4X:
IME.SetCustomFilter(ValueTxt, ValueTxt.INPUT_TYPE_NUMBERS, "1234567890.")
Not Correct (No quotes):
B4X:
IME.SetCustomFilter(ValueTxt, ValueTxt.INPUT_TYPE_NUMBERS, 1234567890.)
Not Correct does not throw an error but it also doesn't work correctly. It KINDA works.

Took me awhile to sort it out.
 

MarkusR

Well-Known Member
Licensed User
Longtime User
btw
have b4a a compiler directive to disable automatically conversion?
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
SetCustomFilter expects a string. The compiler automatically converts numbers to strings:
B4X:
Label1.Text = 10 * 10

So it will happily convert the number you wrote to a string as well.
You know, as I recall the problem I had was the decimal didn't work-the decimal gets dropped in the conversion to a string :p - seems like a compiler error would be better here.
 
Last edited:
Upvote 0
Top