Android Question Basic4Android A Few Questions

ronovar

Active Member
Licensed User
Longtime User
Hi.

I have two problems that i don't know hot to solve...

B4X:
Sub Activity_KeyPress(KeyCode As Int) As Boolean
      Select Case KeyCode
              'Exit - Return    
              If ChListActive=False Then
                     Select Msgbox2("Are You Sure To Close App?", "MainTitle", "YES", "NO", "", Null)
                             Case DialogResponse.POSITIVE
                                     Return False
                             Case DialogResponse.CANCEL
                                     Return True
                             End Select
                      End Select   
              Else
                  ListView1.RemoveView
              End If
End Sub

I would like to when timer1 is enabled then executemyothercode and when is disabled i would like to show messagebox.

Second question is how can i when i show listview1 that the item is automatically selected? I have trayed with listview1.SetSelection(5) but item 5 is not selected.

Many Thanks.
 
Last edited:
Top