How can I animate my rotation smoothly?

Question!

I have an app that has a portrait layout. When I rotate my phone into landscape, it loads another layout that is strictly landscape (it is displaying an ImageView). How can I make the transition from portrait to landscape animate smoothly?



Answers

Set android:configChanges="orientation" in the manifest for the activity and then implement the onConfigurationChanged method to handle the orientation change.

By : jkoelker


This video can help you solving your question :)
By: admin