alexweininger/android-catan

Top and bottom of screen are cut off after turning the tablet back on

Closed this issue · 5 comments

If the tablet power off, when it is turned back on the game loses its full-screen state and there does not seem to be any way to regain it. This makes the game difficult to play as the top and bottom are covered with the android system button and notification bars.

Steps to reproduce:

  1. Start a game
  2. Press the power button to turn the screen off.
  3. Press the power button again to turn the screen on, and swipe up to unlock.

Expected behavior:
The game remains in full-screen mode. Or, it returns to full screen mode when I tap somewhere on its interface.

Actual behavior:
There is no (apparent) way to return the game to full-screen mode.

Hi Dr. Kearney,

Thank you for the bug report! I'd like to know a few things about the bug situation:

  1. Was there a specific action or point in the game that this occurred? We are able to recreate this issue but as soon as we tap an action on the screen it disappears. So it may be possible you are at a part in the game that does not allow this.

  2. Is the GUI still responsive despite it not being in the full screen mode?

This may also be an issue that we have resolved but changes have not been pushed. Please let us know the details, thanks!

  1. In the current version (as of a few minutes ago) I am reliably able to reproduce this behavior while the menu is open. There may have been a change that partly fixed it because the version I was testing earlier today exhibited the same behavior just sitting at the home screen.
  2. Yes, the GUI is responsive. I can, for example navigate between different help pages (although I can't close the help because the button to do so is hidden).
    Let me know if you need any more info to help reproduce.

Managed to recreate the issue, thank you for the feedback. We'll see what we can do as like you said it's preventing you from playing the game.

We managed to fix this issue by placing the following code in onClick after making sure the state wasn't null

View decorView = myActivity.getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN);

Now the game returns back to fullscreen when the user interacts with the game. Closing the issue but feel free to let us know if this issue persists.

With commit 4ef673e, I'm not able to reproduce the fix. However, there is some other oddness going on with the help menu that could be masking the fix; I've filed issue #315 to track that.