Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jetpack Compose support #2193

Merged
merged 1 commit into from
Oct 22, 2022
Merged

Conversation

nielsvanvelzen
Copy link
Member

Creating UI with compose is a billion time easier to do. We're already using it on our mobile app and I've used it for some of my own already. This PR is a starter that just adds the dependencies and build configuration to allow usage of compose in the Android TV app.

Of course because we're a television app there are some issues, like with everything Android TV:

  • Compose is not officially supported for TV (yet)
  • There is no default focus
  • Using compose mixed in Android views is supported, but it doesn't work properly with dpad controls (needs one additional keypress after focusing the compose view)

With these caveats we can't switch our interactive UI (everything that supports dpad controls) but we can rewrite stuff like the backgroundmanager, screensaver, audio now playing screensaver etc.
Google is also working on compose support for tv with the new androidx.tv library. So hopefully we can use compose in more places soon.

Changes

  • Enable Jetpack Compose

Try compose
I have a second branch that migrates the now playing widget that shows up when playing music. This highlights the focus issue but also shows how easy compose is to work with:
https://github.com/nielsvanvelzen/jellyfin-androidtv/tree/compose-nowplayingview

Issues

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Oct 19, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant