1

I know how to disable totally the rotation but my case is a bit more specific. I have a small game which once you click a button "Start" you start playing, so what I want to do is allow the user to choose the orientation before he presses that button and after that lock it until the game ends. While the game is playing there is a chronometer that is counting the time which I can use for an if clause to check if the game is being played but I don't know how to do the whole thing.

Tom
  • 53
  • 1
  • 10
  • Check this out for orientation detection https://stackoverflow.com/questions/5726657/how-to-detect-orientation-change-in-layout-in-android – Talha Q Oct 30 '17 at 03:49
  • This thread gave me the best solution to my question. https://stackoverflow.com/questions/3611457/android-temporarily-disable-orientation-changes-in-an-activity – Tom Nov 15 '17 at 14:23

0 Answers0