Skip to content Skip to sidebar Skip to footer

What Is The Best Practice To Start An Animation Directly After The Layout Of An Activity Was Rendered?

I'm looking for a best practice pattern which helps me with the following problem. I want to start an animation as soon as the layout of an Activity got rendered to the screen. As

Solution 1:

ViewTreeObserver.OnGlobalLayoutListener should help. Also ViewTreeObserver.OnPreDrawListener.

I had to deal with this problem in this code android-sliding-menu-demo.

Post a Comment for "What Is The Best Practice To Start An Animation Directly After The Layout Of An Activity Was Rendered?"