This is the code (straight from an example from the IDE):
If i enter the email address manually, all is good.
If I click on one of the suggestions (I guess they come from Android itself), the dialog closes but none of the following code is executed, it seems to just return to main.
This is on a Pixel 3 running Android 11 but I tried on other devices and it does the same thing.
I also tried the non-async version and it does the same thing.
B4X:
Sub Button2_Click
Dim email As String
id.InputType = id.INPUT_TYPE_TEXT
id.Input = ""
id.Hint = "[email protected]"
id.HintColor = Colors.ARGB( 196, 255, 140, 0 )
Dim sf As Object = id.ShowAsync( "Enter email address", "Test", "Yes", "Cancel", "No", Null, False )
Wait For( sf ) Dialog_Result( Result As Int )
If Result = DialogResponse.POSITIVE Then
' Check if value is empty
If id.Input = "" Then
ToastMessageShow( "No email, cancelled", True )
IME.HideKeyboard
Return
Else
email = id.Input
Log( email )
End If
Else
Log( Result )
IME.HideKeyboard
Return
End If
Log( "done" )
End Sub
If i enter the email address manually, all is good.
If I click on one of the suggestions (I guess they come from Android itself), the dialog closes but none of the following code is executed, it seems to just return to main.
This is on a Pixel 3 running Android 11 but I tried on other devices and it does the same thing.
I also tried the non-async version and it does the same thing.
Attachments
Last edited: