Public Sub SetVisibleAnimatedAndSleep(v As B4XView, Visible As Boolean, Duration) As ResumableSub
v.SetVisibleAnimated(Visible, Duration)
Sleep(Duration)
Return True
End Sub
'use it:
Wait For (Utils.SetVisibleAnimatedAndSleep(xPage, True, 1000)) Complete (Unused As Boolean)