Android Question [Solved] Done button doesn't fire enterpressed event

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All

I have an App with 5 Edittexts in to which 5 parameters are entered. Tapping on any ET brings up the soft KB [Number input - Force Done].
All ET defined in the visual designer.
All have the same design.
All accept input.

4 ET go to their respective EnterPressed Sub when the DONE key is pressed, one ET doesn't.
Below are two Sub routines. The DONE key moves to the second Sub but not to the first Sub from their respective ETs.

I know it is sparse information but it is all I have.

Has anyone experienced this before? I am at a loss??????


Regards Roger

B4X:
Sub DispConcentrationIndexS_EnterPressed  
Log("***********Here1******************")
    Validate
    dummytext.RequestFocus
    Ph.HideKeyboard(Activity)
End Sub

Sub DispDilutionIndexS_EnterPressed  
Log("***********Here2******************")
    Validate
    dummytext.RequestFocus
    Ph.HideKeyboard(Activity)
End Sub
 
Last edited:

Roger Daley

Well-Known Member
Licensed User
Longtime User
Erel,
Already a fairly small project so Zipped and uploaded.
Changing the "Concentrate Index" should trigger a new "Total Concentrate" figure.

Looking forward to the Duh! moment.

Regards Roger
 

Attachments

  • Embalmer.zip
    25.1 KB · Views: 191
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that the layout doesn't look good here:

upload_2016-7-20_18-3-22.png


Why are you changing the focus and hiding the keyboard in the event subs? The keyboard will be hidden automatically.

I think that the EventName is not set correctly:

SS-2016-07-20_18.05.34.png
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Note that the layout doesn't look good here:

View attachment 46248

Why are you changing the focus and hiding the keyboard in the event subs? The keyboard will be hidden automatically.

I think that the EventName is not set correctly:

SS-2016-07-20_18.05.34.png

Eventname . Duh! Slap myself.

Thanks Erel, I looked many times but missed it.

Thanks also for the screenshot. I will fix that.
KB, a legacy issue from an earlier App.
Change focus: Because focus can be changed by other means I have most actions in the focusedchanged event.

Many thanks Roger
 
Upvote 0
Top