Enhance lyrics sheet with animations and add a keep-screen-on toggle#2040
Merged
Conversation
… pattern Previously the lyrics sheet only applied a translationY of 8 % on back gesture progress. Full-screen destinations across the rest of the app (and Android's own predictive back spec) also shrink and fade the surface so the screen behind is revealed naturally. - scaleX/Y: 1f → 0.92f - translationY: 0 → 8 % of height (unchanged) - alpha: 1f → 0.72f All three are read inside graphicsLayer (draw phase) via the existing backProgressProvider lambda — zero recomposition per gesture frame, consistent with the SheetVisualState pattern.
…mation When animated lyrics is enabled, the active word now springs up to 1.15× scale on highlight and neighbouring words dim to 55 % alpha, making the active word read clearly without relying on colour contrast alone. Both values are driven by animateFloatAsState with the same StiffnessVeryLow / DampingRatioMediumBouncy spring already used for the colour transition, so the whole word feels like a single cohesive motion. Scale and alpha are applied inside graphicsLayer on the visible Text only — the invisible bold spacer Text is unaffected, so layout never changes and there is zero reflow per animation frame. When useAnimatedLyrics is off both animations resolve to their identity values (scale = 1f, alpha = 1f) and are effectively no-ops, keeping the plain mode unchanged. feat(lyrics): add keep-screen-on toggle to lyrics sheet - Toggle persisted to DataStore under "keep_screen_on_lyrics" key - Sets FLAG_KEEP_SCREEN_ON via view.keepScreenOn (no permissions required) - Registers BroadcastReceiver for ACTION_SCREEN_OFF to auto-reset the flag when the screen is turned off by power button or OEM sleep gesture - Flag and receiver are scoped to LyricsSheet composition lifetime - New "Keep screen on" switch added to LyricsMoreBottomSheet Controls group
feat(lyrics): add keep-screen-on toggle and improve animations
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.
Enhances the lyrics sheet with smooth, performance-optimized word highlight animations and a persistent "Keep screen on" toggle.
Key Features
Word-Level Highlights
1.10fscale, while unhighlighted words dim to0.55falpha for better readability.graphicsLayerto skip the layout pass, ensuring stable, high-performance rendering.Keep Screen On Toggle
LyricsMoreBottomSheetbacked byDataStore.ON_STOP).ACTION_SCREEN_OFFto automatically reset the preference if the user locks the device manually.