Sketch resets on rotating


#1

Hello,
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?


#2

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


#3

@FurryNightShade====
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().


#4

@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.