Skip to content

Make keepScreenOn behavior configurable in SceneView#645

Merged
grassydragon merged 1 commit intoSceneView:mainfrom
Antiglobalist:feature/controlled-keep-screen-on
Dec 25, 2025
Merged

Make keepScreenOn behavior configurable in SceneView#645
grassydragon merged 1 commit intoSceneView:mainfrom
Antiglobalist:feature/controlled-keep-screen-on

Conversation

@Antiglobalist
Copy link
Contributor

Previously, SceneView enforced keepScreenOn = true by default, without providing a way to disable it. This caused issues in complex layouts - especially when SceneView is embedded within a RecyclerView or part of a composite screen - where screen wake behavior should be contextually controlled.

This patch replaces the hardcoded behavior with a standard public property:
var keepScreenOn: Boolean

Developers can now disable screen wake behavior by setting SceneView.keepScreenOn = false after instantiation.
Benefits:

  • ✅ Preserves backward compatibility for existing integrations
  • 🧩 Aligns with native Android practices for screen-on control
  • 🔧 Enables fine-grained control over screen wake behavior in dynamic UI scenarios

@grassydragon grassydragon merged commit 9088243 into SceneView:main Dec 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants