Android Question Erratic tab order behavior when using physical keyboard and bluetooth reader in edit fields

Gabino A. de la Gala

Active Member
Licensed User
Longtime User
I have been doing trial and error tests for a few days to try to find the reason why when going through the edit type views of a form it does not go through them in the same order when filling them.

If I use the virtual keyboard of the android, it seems to do it well, scrolling from left to right and from top to bottom.

However, if I connect a physical keyboard to the device or a barcode reader, the order in which it cycles through them is not the same and some of them skip over them.

Is there anything I can turn on or off for testing?

Apparently the same thing happens to me using views of type EditField than B4XFloatTextField.

Taking advantage. Could someone explain to me what criteria B4X applies when setting the order in which they are going to go through? The order in which they appear in the view tree in the designer? The horizontal and vertical position of the views in the form?

Thank you and greetings.
 

Gabino A. de la Gala

Active Member
Licensed User
Longtime User
I just realized that using the physical keyboard, if I press the tab key instead of the enter key, the fields go through them in the same order as using the phone's virtual keyboard.

What I also notice is that when I press the Tab key, the field changes, but the EnterPressed event does not jump.
 
Upvote 0

Gabino A. de la Gala

Active Member
Licensed User
Longtime User
After reading the text, which luckily for me, was in "EspaƱol" I have decided to stop using the enter and start using the tab.

I'm using B4XFloatTextField, and when I was all happy with the tab responding in the correct order, I realized that it only works correctly if the fields are blank. If they have content, then it doesn't advance to the next field, instead they all jump to the first.

I understand that there must be a problem with this type of object and its special characteristics, "Clear", "Accept" and "Reveal". If you deactivate all of them, then the order of jumps between fields when pressing the TAB key already works correctly again.

Another drawback is that the EnterKeyPressed event stops working, so I guess everything will have to be done in the FocusChanged event.

Maybe @Erel could do his "magic"...
 
Upvote 0
Top