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

@ -324,12 +324,13 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
}
}
private fun updateImmersiveAndEdgeToEdgeModes() {
private fun updateWindowAppearance() {
val editorWindowInfo = getEditorWindowInfo()
if (editorWindowInfo == EDITOR_MAIN_INFO || editorWindowInfo == RUN_GAME_INFO) {
godot?.apply {
enableImmersiveMode(isInImmersiveMode(), true)
enableEdgeToEdge(isInEdgeToEdgeMode(), true)
setSystemBarsAppearance()
}
}
}
@ -339,13 +340,13 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
runOnUiThread {
// Hide the loading indicator
editorLoadingIndicator?.visibility = View.GONE
updateImmersiveAndEdgeToEdgeModes()
updateWindowAppearance()
}
}
override fun onResume() {
super.onResume()
updateImmersiveAndEdgeToEdgeModes()
updateWindowAppearance()
if (getEditorWindowInfo() == EDITOR_MAIN_INFO &&
godot?.isEditorHint() == true &&