1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Android: Add option to change background color and fix system bar regression

This commit is contained in:
Anish Mishra
2025-07-12 22:16:29 +05:30
parent 967e2d499a
commit 0506299c21
5 changed files with 54 additions and 6 deletions

View File

@@ -56,11 +56,12 @@ public class GodotApp extends GodotActivity {
}
}
private final Runnable updateImmersiveAndEdgeToEdgeModes = () -> {
private final Runnable updateWindowAppearance = () -> {
Godot godot = getGodot();
if (godot != null) {
godot.enableImmersiveMode(godot.isInImmersiveMode(), true);
godot.enableEdgeToEdge(godot.isInEdgeToEdgeMode(), true);
godot.setSystemBarsAppearance();
}
};
@@ -74,12 +75,12 @@ public class GodotApp extends GodotActivity {
@Override
public void onResume() {
super.onResume();
updateImmersiveAndEdgeToEdgeModes.run();
updateWindowAppearance.run();
}
@Override
public void onGodotMainLoopStarted() {
super.onGodotMainLoopStarted();
runOnUiThread(updateImmersiveAndEdgeToEdgeModes);
runOnUiThread(updateWindowAppearance);
}
}