1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-10 19:32:10 +00:00

Android: build fixes & compat fixes

This commit is contained in:
MoNTE48 2019-11-07 00:39:39 +01:00 committed by Loic Blot
parent dfd5f7cb10
commit 7f023de5cb
No known key found for this signature in database
GPG key ID: EFAA458E8C153987
11 changed files with 91 additions and 100 deletions

View file

@ -37,20 +37,17 @@ public class MtNativeActivity extends NativeActivity {
makeFullScreen();
}
public void makeFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
private void makeFullScreen() {
if (Build.VERSION.SDK_INT >= 19)
this.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
if (hasFocus)
makeFullScreen();
}
}
public void copyAssets() {