procedure TAndroidModule1.EditText1Enter(Sender: TObject);
begin
ShowMessage('You just press key "Enter"');
end;
Yesterday I have installed the latest version v2.4.0f of “fpcupdeluxe”.
I have recompiled my all LAMW programs with targetSdk set to 35.
Now I have discovered that in all my programs in all jEditText components “OnEnter” event no longer works.
As a workaround fix I have moved my program code from “OnEnter” event into “OnDone” event, and now it works.
However “OnDone” event works only when virtual keyboard shows submit button with the word “Done”.
When the number of visible jEditText components changes from one to more then submit button of virtual keyboard shows the word “Next” instead of word “Done” and in this case “OnDone” event fails to work.
I have stopped random switches (of submit button of virtual keyboard) from “Done” into “Next” by adding the following code to OnJNIPrompt event:
InputTextEdit.SetImeOptions(imeActionDone); // Theoretically this should set submit button to "Done", however it sets to "Enter"
Additionally I have connected three events together (just in case if submit button will randomly switch from “Enter” into “Done” or “Next”):
procedure TAndroidModule1.InputTextEditEnter(Sender: TObject);
begin
InputTextEditDone(Self);
end;
procedure TAndroidModule1.InputTextEditNext(Sender: TObject);
begin
InputTextEditDone(Self);
end;
What's the difference between handling the enter/done/go and and triggering the " event...
In Android/LAMW "OnEnter" just handle enter/done/go key.....
In the latest version v2.4.0f of “fpcupdeluxe” this behavior has changed.
Now “OnDone” and “OnNext” and “OnEnter” are separate events.