Android Question Fade-in/Fade-out when activity pause/resume

Cableguy

Expert
Licensed User
Longtime User
I was trying to create a fade-out/ fade-in when I changed activities, but although I can Fade-Out, the fade-in seems not to work!

my code (the simplest one):

B4X:
Sub Activity_Resume
    Activity.SetVisibleAnimated(500,True)
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    Activity.SetVisibleAnimated(500,False)
End Sub

I have noticed that even with other views the fade in seems not to be working!
 

ilan

Expert
Licensed User
Longtime User
Try to put it in a panel and use the visibleanimation on the panel

Also you may call DoEvents before that
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Btw the pause event is not a place to start an animation you better catch the back key and start an animation and a timer after animation is finished call activity.finish (in timer_tick event)
 
Upvote 0
Top