Hello
I'm use a doevents to wait actions (like closedrawer, i atach a sample). I try use with sleep, and the visual efect is not nice.
I'm use a doevents to wait actions (like closedrawer, i atach a sample). I try use with sleep, and the visual efect is not nice.
B4X:
Sub NavDrawer_NavigationItemSelected (MenuItem As ACMenuItem, DrawerGravity As Int)
NavDrawer.CloseDrawer
WaitFor(400)
Select Case MenuItem.Id
Case 1:
...
End Select
end sub
Sub WaitFor(Milliseconds As Double)
If Milliseconds=0 Then
DoEvents
Else
Dim s As Long
s = DateTime.Now
Do While DateTime.Now < s + Milliseconds
DoEvents
Loop
End If
End Sub