Repository navigation
feat: add full D-pad/Android TV support across all screens - #1499
Open
Karthik7013 wants to merge 8 commits into
Open
Karthik7013 wants to merge 8 commits into
Karthik7013 wants to merge 8 commits into
Conversation
- Add TVFocusHandler component with D-pad key handling and tvCombinedClickable modifier - Enhance TvNavigationRail with bidirectional focus (rail <-> content) - Add TV focus management in MainActivity shell - Add TV-aware focus navigation to all screens: Home, Library, Search, Playlists, Account, Album, Stats, History, Explore, Charts, New Release, YouTube Browse, Artist screens, Settings, News, ViewNews, Podcast, Spotify Liked Songs - Add Player D-pad controls (TV only): Center/Enter=Play/Pause, Left=Prev, Right=Next, Up/Down=Volume - Make all clickable/interactive elements focusable for D-pad navigation
- Add missing focusProperties import to MainActivity.kt - Fix TVFocusHandler.kt: add missing key/type extension imports, clickable import, FocusDirection import, animateColorAsState import - Fix Box contentAlignment parameter (was verticalAlignment) - Remove unsupported direction parameter from focusProperties
…ded) - Backup original build.yml as build.yml.backup - New build-tv-debug.yml: builds only TV debug APK - No matrix builds (single job, no multiple versions) - No signing secrets required (debug variant) - No Telegram notifications - Triggers on manual dispatch or push to main/dev/kilo/**
- Replace Key.DPadCenter with Key(KEYCODE_DPAD_CENTER.toLong()) in TVFocusHandler.kt, Player.kt, HomeScreenComponents.kt - Replace Key.Enter with Key(KEYCODE_ENTER.toLong()) - Add by keyword for animateColorAsState and animateFloatAsState delegates - Fix Arrangement.CenterVertically reference - Remove interactionSource/indication from clickable calls (not supported) - Fix Queue.kt return@combinedClickable labels (invalid) - Add missing focusable import to NewsScreen, ViewNewsScreen, LibraryScreen, SpotifyLikedSongsScreen, PodcastScreen, AppearanceSettings, MusicTogetherScreen, PalettePickerScreen, StorageSettings - Add missing onKeyEvent/Key/key imports to HomeScreenComponents.kt
- Remove animations from TVFocusHandler.kt (use static colors instead of animateColorAsState/animateFloatAsState delegates) - Fix Arrangement.CenterVertically reference - Remove unused android.view.KeyEvent static imports from HomeScreenComponents.kt - Revert to Key.DPadCenter/Key.Enter (exist in Compose Key object) - All tvCombinedClickable, tvSectionFocus, tvDpadClickable use static key codes
- Change Arrangement.CenterVertically to Arrangement.Center in TVFocusHandler.kt - Fix Modifier reference in Box to use androidx.compose.ui.Modifier - Change Key.DPadCenter back to Key(KEYCODE_DPAD_CENTER.toLong()) in HomeScreenComponents.kt - Ensure KEYCODE_ENTER and KEYCODE_NUMPAD_ENTER imports in HomeScreenComponents.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Before submitting a pull request, you must attest to the following:
<<<<<<< HEAD
=======
Summary
Linked Work
Change Type
Affected Surfaces
:app:core:lyrics:lastfm:canvas:shazamkit:spotifycoreScreenshots / Recordings
Behavior Notes
Architecture Checklist
Loading,Success,Empty, andErrorwhere this PR introduces or changes screen state.runBlockingis introduced in app execution paths.Compose / Material Checklist
collectAsStateWithLifecycle().@Immutableor@Stable.keyvalues and explicitcontentType.derivedStateOfwhere appropriate.stringResource()and duplicated visible strings on the same screen are avoided.WindowInsetscorrectly when this PR changes screen layout.Concurrency / Performance Checklist
viewModelScopeor an existing lifecycle-owned application/service scope.Dispatchers.IOorDispatchers.Default.Data / Persistence Checklist
app/schemas.Playback / Integration Checklist
universal,arm64,armeabi,x86, andx86_64variants.Localization / Assets Checklist
Privacy / Security Checklist
Verification
Reviewer Focus
Release Notes