Skip to content

Move UI hosting and menu infrastructure to android-ui-common - #121

Open
MattiasBuelens wants to merge 2 commits into
developfrom
feature/tv-ui-common
Open

MattiasBuelens wants to merge 2 commits into
developfrom
feature/tv-ui-common

Conversation

@MattiasBuelens

Copy link
Copy Markdown
Collaborator

Summary

Moves the layout-independent parts of UIController from :ui to :ui-common. A future TV renderer can then reuse them without depending on :ui or Material3. The package stays com.theoplayer.android.ui and behavior is unchanged.

Moved to :ui-common:

  • MenuScope.kt: MenuContent and MenuScope. The Material3 MenuScope.Menu(...) composable stays in :ui.
  • UIControllerScope.kt: UIControllerScope and UIControllerScopeImpl. The impl holds the menu stack, the lazy Player and activityInPipMode. It was private and is now public + @InternalUiApi.
  • PlayerContainer.kt: PlayerContainer hosts the THEOplayerView and the controls' ComposeView inside the SDK's UI container. It still uses DisposeOnLifecycleDestroyed and calls disposeComposition() in onDispose. It was private and is now public + @InternalUiApi.
  • THEOplayerViewLifecycle.kt: rememberTHEOplayerView(config) (public, as before) and its preview-safe context wrappers. rememberTHEOplayerViewInternal and setupTHEOplayerView were internal and are now public + @InternalUiApi.

:ui-common now depends on lifecycle-runtime-compose and compose-foundation, but still not on Material3.

The UIController overloads, UIControllerImpl, rememberPlayer, Menu and THEOplayerTheme stay in :ui.

Link to Devin session: https://dolby.devinenterprise.com/sessions/6307f9268b9b47fbab4169cde6216af1
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/6307f9268b9b47fbab4169cde6216af1?variant=devin
Requested by: @MattiasBuelens

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Comment thread ui-common/src/main/java/com/theoplayer/android/ui/MenuScope.kt Outdated
@MattiasBuelens
MattiasBuelens added this pull request to stack #123 October 14, 2026 14:16
MattiasBuelens and others added 2 commits October 15, 2026 11:05
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant