How can I do a fade animation when the user rotates the phone?
My app's main screen is a listview in portrait mode. When it is in landscape orientation it switches to an ImageView. I want to be able to animate a 开发者_如何学编程fading transition when I switch orientations. How can I go about doing this?
I found a similar question: How to do a fadein of an image on an Android Activity screen?
that has the solution. Just need to make sure the animation is performed after the UI is mapped to the XML. Android kills the activity every time you rotate, so best place is onStart() or onCreate()
精彩评论