Sketch resets on rotating


on Android, every time I rotate the screen, the sketch resets / restarts. Is there a way to disable this or should I fix the orientation and use gyroscope to detect rotation?

If this is duplicate, could you send me a link to the other post?


Please Post some code, so we can See where the Problem lies.


that s absolutely normal!
either you fix the orientation (portrait or landscape) in the manifest (you can also do that by code) or you choose to handle yourself what is supposed to happens onConfigurationChanged().


@Lexyth, well, it is any app. Just draw text displaying frameCount and see for yourself.

@akenaton, I’ll take a look at onConfigurationChanged(). If it is too complicated, I’ll just use gyroscope.