views:

58

answers:

1

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?

A: 

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

jkoelker
while this is true, how do I get the rotation to be smooth? it is jerky at the moment.
Sheehan Alam
You will have to write something to move the layout as you see fit. What is happening now is that the old layout is being removed, and a new layout is being created. If you want a "smooth" transition you will need to manually move your layout elements through the view to achieve the desired effect you want. There is no SDK feature for smooth rotation, you have to program it yourself which would all be app and layout specific.
jkoelker