Salve a tutti,
come faccio a gestire il tasto indietro, cosi da permettermi di visualizzare l'ultima schermata vista?
io ora sto facendo cosi , praticamente riportando al premere il tasto indietro, a visualizzare la prima schermata.
Sub Activity_KeyPress (KeyCode As Int) As Boolean
Select KeyCode
Case KeyCodes.KEYCODE_BACK
If Panel2.Visible=True Or Panel3.Visible = True Or Panel4.Visible = True Or Panel6.Visible = True Or Panel5.Visible = True Or Panel1.Visible = True Or Panel8.Visible = True Or Panel9.Visible= True Then
Panel2.Visible=False
Panel3.Visible=False
Panel4.Visible = False
Panel6.Visible = False
Panel5.Visible = False
Panel1.Visible=False
Panel7.Visible= True
Panel8.Visible= False
Panel9.Visible= False
Return True
Else
CallSubDelayed(Me, "HandleBackKey")
Return True
End If
End Select
End Sub
Sub HandleBackKey
Dim Answ As Int
Dim txt As String
txt = "Sicuro che vuoi uscire?"
Answ = Msgbox2(txt, "A T T E N Z I O N E", "Yes", "", "No", Null)
If Answ = DialogResponse.POSITIVE Then
Activity.Finish
End If
End Sub
come faccio a gestire il tasto indietro, cosi da permettermi di visualizzare l'ultima schermata vista?
io ora sto facendo cosi , praticamente riportando al premere il tasto indietro, a visualizzare la prima schermata.
Sub Activity_KeyPress (KeyCode As Int) As Boolean
Select KeyCode
Case KeyCodes.KEYCODE_BACK
If Panel2.Visible=True Or Panel3.Visible = True Or Panel4.Visible = True Or Panel6.Visible = True Or Panel5.Visible = True Or Panel1.Visible = True Or Panel8.Visible = True Or Panel9.Visible= True Then
Panel2.Visible=False
Panel3.Visible=False
Panel4.Visible = False
Panel6.Visible = False
Panel5.Visible = False
Panel1.Visible=False
Panel7.Visible= True
Panel8.Visible= False
Panel9.Visible= False
Return True
Else
CallSubDelayed(Me, "HandleBackKey")
Return True
End If
End Select
End Sub
Sub HandleBackKey
Dim Answ As Int
Dim txt As String
txt = "Sicuro che vuoi uscire?"
Answ = Msgbox2(txt, "A T T E N Z I O N E", "Yes", "", "No", Null)
If Answ = DialogResponse.POSITIVE Then
Activity.Finish
End If
End Sub