Android Question Custom dialogs and async methods

luke2012

Well-Known Member
Licensed User
Longtime User
How to port this code using Custom dialogs and async methods (i need to customize the look & feel) ?
Thanks for your help :)

B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean 
   
'Intercept the back action in order to avoid unwanted app exit
    If KeyCode = KeyCodes.KEYCODE_BACK Then   
         Select KeyCode
            Case KeyCodes.KEYCODE_BACK
                                                               
                'App exit
                Private Answ As Int
                Answ = Msgbox2("Vuoi uscire dall'App ?", "", "Si", "", "No", Null)
                If Answ = DialogResponse.POSITIVE Then
                    Activity.Finish
                Else
                    Return True
                End If

            End Select
    End If
End Sub

End Select

End If

End Sub
 
Top