Disable rotating animation when orientation change
-
-
In a slot that handles the orientation change, use animation.stop() or animation.complete().
-
I used "animation" as the id of QML Animation object. You should use the id from your app. So, if you are using "myAnimation" as id, you should write:
@
onOrientationChangeAboutToStart: {
myAnimation.complete();
}
@ -
Hi,
Maybe I'm wrong, but when you change the orientation with
@orientationLock = PageOrientation.LockLandscape;@the screen will be automatically rotated, so this animation is not created or handled by us; so is it possible for us to get this animation object so that we can stop it?
Thanks
-
Oh, sorry. I thought you are talking about an animation you have created yourself.
In this case, I don't know what the solution is, probably, something OS-dependent has to be tweaked. I'm creating an app, it supports orientation changes, but no animation is played by default (that's on Android. And to be honest, I've just realised I've turned animations off in OS settings... ;) ).
-
[quote author="sierdzio" date="1328776250"]Oh, sorry. I thought you are talking about an animation you have created yourself.
In this case, I don't know what the solution is, probably, something OS-dependent has to be tweaked. I'm creating an app, it supports orientation changes, but no animation is played by default (that's on Android. And to be honest, I've just realised I've turned animations off in OS settings... ;) ).[/quote]
@sierdzio: LOL
I've also not yet able to do this; however, a workaround can be done here which is to hide (visible) the PageStackWindow when orientation's animation take place. Not a perfect way but it works :-)