Created
August 5, 2014 20:37
-
-
Save kived/04c1d7a9105f0815efcd to your computer and use it in GitHub Desktop.
make immersive (py4a)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from android.runnable import run_on_ui_thread | |
from jnius import autoclass | |
mActivity = autoclass('org.renpy.android.PythonActivity').mActivity | |
View = autoclass('android.view.View') | |
@run_on_ui_thread | |
def make_immersive(): | |
view = mActivity.getWindow().getDecorView() | |
view.setSystemUiVisibility( | |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | | |
View.SYSTEM_UI_FLAG_FULLSCREEN | | |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | | |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | | |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment