Animation while changing orientation
Is it possible to set animation
when we mo开发者_Go百科ve from an activity in landscape view to an activity in portrait view ?
It's possible, but not trivial. Add this property to your <activity>
in your AndroidManifest.xml
file:
android:configChanges="orientation|keyboard|keyboardHidden"
Then, override your activity's onConfigurationChanged
and perform the animation there.
I can give you an idea. Try to implement it this way.
Add viewFlipper as a parent node in your layout and set animation to flipper.
Now when you change configuration from portrait to lndscape or vice-versa, you get a call to the method onConfigurationChanged() in your activity. (you will have to overide this method).
Now animate your flipper using startFlipping() and you are done.
Thanks.
精彩评论