Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animation while changing orientation

Tags:

android

Is it possible to set animation when we move from an activity in landscape view to an activity in portrait view ?

like image 489
nila Avatar asked Oct 11 '22 15:10

nila


1 Answers

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.

like image 140
Felix Avatar answered Oct 14 '22 01:10

Felix