Android Question Numbers in Edit box

JMB

Active Member
Licensed User
Longtime User
Hi, been away a while, so I've forgotten a load of stuff.

How do I create a text edit box which will accept only numbers?

I know how to do this using a dialog, but I just want a text editor box - no dialog required.

Thanks

JMB
 

Mahares

Expert
Licensed User
Longtime User
B4X:
IME.SetCustomFilter(EditText3, EditText3.INPUT_TYPE_NUMBERS, "0123456789.")
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
B4X:
EditText1.InputType=EditText1.INPUT_TYPE_NUMBERS ' Integer Number
B4X:
EditText1.InputType=EditText1.INPUT_TYPE_DECIMAL_NUMBERS ' Real Number
B4X:
EditText1.InputType=EditText1.INPUT_TYPE_PHONE ' Phone  Number
 
Upvote 0
Top