InputType problem

Dirk A

Member
Licensed User
Longtime User
Hello,

i'm trying to set the input type of my edittext fields but it won't work

B4X:
editCode.InputType = editCode.INPUT_TYPE_DECIMAL_NUMBERS

or
B4X:
IME1.SetCustomFilter(editCode, editCode.INPUT_TYPE_NUMBERS , "0123456789")

No matter what inputType I choose I always get the same keyboard layout

any ideas ?
 

Dirk A

Member
Licensed User
Longtime User
I can enter digits 0 to 9 and some non-numeric characters like & @ : ; ( ) " '
And there's an ABC button to change to letter input

But no matter what type of input I choose Input_type_DECIMAL_NUMBERS or input_type_phone , input_type_numbers I always have the same layout

Edit :
i'm using xt9 text input version 2.0 , could changing the keyboard solve the problem ?
 
Last edited:
Upvote 0

lordjuergen

Member
Licensed User
Longtime User
I have the same problem with the 2.20 Version. Yesterday with 2.00 Version everything was ok.

Now I have the same keyboard (TEXT) no matter what inputtype I use (NUMBERS, DECIMAL_NUMBERS). I can enter non-numeric characters in numeric fields.
 
Last edited:
Upvote 0

Dirk A

Member
Licensed User
Longtime User
I've just installed b4a v2.20 and now it's even worse , now I have the same issue as lordjuergen : the keyboard is always of type input_text ...
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
It's a bug in 2.2

They're looking into it.

My solution is to code it in my Activity_Create after the layout is loaded.

B4X:
    etInsulin1Breakfast.InputType=etInsulin1Breakfast.INPUT_TYPE_DECIMAL_NUMBERS 
   etInsulin1Lunch.InputType=etInsulin1Lunch.INPUT_TYPE_DECIMAL_NUMBERS
   etInsulin1Dinner.InputType=etInsulin1Dinner.INPUT_TYPE_DECIMAL_NUMBERS 
   etInsulin1BeforeBed.InputType = etInsulin1BeforeBed.INPUT_TYPE_DECIMAL_NUMBERS 
   
   etInsulin2Breakfast.InputType=etInsulin2Breakfast.INPUT_TYPE_DECIMAL_NUMBERS 
   etInsulin2Lunch.InputType=etInsulin2Lunch.INPUT_TYPE_DECIMAL_NUMBERS
   etInsulin2Dinner.InputType=etInsulin2Dinner.INPUT_TYPE_DECIMAL_NUMBERS 
   etInsulin2BeforeBed.InputType = etInsulin2BeforeBed.INPUT_TYPE_DECIMAL_NUMBERS 

   etBeforeBreakfast.InputType = etBeforeBreakfast.INPUT_TYPE_DECIMAL_NUMBERS 
   etBeforeLunch.InputType = etBeforeLunch.INPUT_TYPE_DECIMAL_NUMBERS 
   etBeforeDinner.InputType = etBeforeDinner.INPUT_TYPE_DECIMAL_NUMBERS
   etBeforeSupperOrBed.InputType = etBeforeSupperOrBed.INPUT_TYPE_DECIMAL_NUMBERS

all the above are edittexts. I assume we'd need to it for autocompleteedittexts also but I haven't tested that as I don't need them with just numbers in the list.

regards, Ricky
 
Upvote 0

Dirk A

Member
Licensed User
Longtime User
Hey Ricky D ,
It worked , I tried to set the inputtype after the layout was loaded (in the earlier version it didn't matter before or after the loading of the layout).
Thanks
 
Upvote 0
Top