Bug? Button Done First EditText

MarcoRome

Expert
Licensed User
Longtime User
Hi Erel, hi all.
When you create a layout for example with a some EditText.
When we open the keyboard on the First EditText it is always the "Done" button instead of "Next", on other EditText is the exact key (Next) and the last button, as it should be the "Done" button.
I do not understand why the first is always showing the "Done" button

upload_2016-12-13_23-36-39.png


Now i know that exist class FieldOrder by @stevel05 but can you fix this ?
In attachment also example
Thank you
Marco
 

Attachments

  • TestButtonDone.zip
    9.6 KB · Views: 174

MarcoRome

Expert
Licensed User
Longtime User
Another information...if you change field, example tap about 2 or 3 field and comeback first ..is right in keyboard vanish "Done" and i see "Next"
 

LucaMs

Expert
Licensed User
Longtime User
but can you fix this
Without thinking too much... create first an invisible EditText (I don't know if it works, of course, try ;))

[Please, downsize the images you post, I have to scroll 1,000,000 cm to read your text :D]


P.S. It works but you have to write this code before your "ExitText1.RequestFocus":
B4X:
EditText0.RequestFocus
DoEvents

EditText0 is set to invisible.
 

Attachments

  • testbuttondone2.zip
    7.8 KB · Views: 220
Last edited:

MarcoRome

Expert
Licensed User
Longtime User
Without thinking too much... create first an invisible EditText (I don't know if it works, of course, try ;))

[Please, downsize the images you post, I have to scroll 1,000,000 cm to read your text :D]


P.S. It works but you have to write this code before your "ExitText1.RequestFocus":
B4X:
EditText0.RequestFocus
DoEvents

EditText0 is set to invisible.
Thanks Luca for your response. Anyway is more easy add class FieldOrder that resolve this

FieldOrder.Initialize(ArrayAs Object(EditText1,EditText6,EditText5,EditText2,EditText3,EditText4),False)
this work without problem
 

MarcoRome

Expert
Licensed User
Longtime User
This is not a bug, at least not in B4A.

The button is handled by the OS unless you set ForceDone to true.

When I test your program on Nexus 5X running Android 7 it works properly:

View attachment 50947

Test it with a different keyboard. It might be an issue in the keyboard implementation.

Thank Erel for your response.
I tried with Samsung S7 Edge / Huawey P9 lite. Have same result.
If you see about this movie ( Samsung S7 Edge ) if you run in:

- Debug mode ---> no problem is correct
- in Release Mole or Release ( obfuscated ) ---> i have the problem


Obviously nothing serious. But if you had the option of not having this problem it would be better
Thank you for your attention ;)
Marco
 

MarcoRome

Expert
Licensed User
Longtime User
I know FieldOrder but it is useful to set the tab order, not to your question.
??
Luca what you mean ??
If i have my example and i write in Activity Create
B4X:
FieldOrder.Initialize(ArrayAs Object(EditText1,EditText2,EditText3,EditText4),False)
EditText1.RequestFocus
i resolve the problem. Already tried long time ago
 

LucaMs

Expert
Licensed User
Longtime User
Reading your first post I thought you meant: "I know FieldOrder... but it is not enough".

I don't know why FieldOrder solves your problem.

BTW... perché tu hai "successivo" e io invece "avanti" e tu "Fatto" mentre io ho "Eseguito"? :D
 
Last edited:

MarcoRome

Expert
Licensed User
Longtime User
I see it too in Release mode. It will not happen if you remove the RequestFocus line. Why do you need it?

So the customer already have focus about field.
If i use this code with class FOrder work without problem:
B4X:
Activity.LoadLayout("1")
Ordina.Initialize(Array As Object(EditText1,EditText2,EditText3,EditText4),False)
EditText1.RequestFocus

In attachment example with this class
 

Attachments

  • TestButtonDone2.zip
    11.5 KB · Views: 195
Top