Skip to content

feat(player):Add compact lyrics display inside the album cover - #1029

Open
SteveZMTstudios wants to merge 1 commit into
FoedusProgramme:betafrom
SteveZMTstudios:feat/partial-lyrics-display
Open

SteveZMTstudios wants to merge 1 commit into
FoedusProgramme:betafrom
SteveZMTstudios:feat/partial-lyrics-display

Conversation

@SteveZMTstudios

Copy link
Copy Markdown
Contributor

Summary

Adds an opt-in mode that draws the lyrics inside the album cover of the full player instead of over the whole screen, so the artwork stays visible while reading them.

New setting: lyrics settings -> "Fullscreen lyrics" (lyric_fullscreen, default on = current behaviour). Turning it off switches the full player to the compact / inline presentation.

Why a second LyricsView instead of moving one

  • ConstraintSet can only change constraints within one parent. Moving a view between parents needs removeView + addView, which drops layout and scroll state.
  • The fullscreen instance lives inside FullBottomSheet, and FullBottomSheet itself is set GONE while fullscreen lyrics are shown - a single instance inside the sheet would be hidden by its own ancestor.
  • The inline instance has to be transparent so the dimmed artwork shows through, while the fullscreen one paints a solid theme-derived background.

So inline_lyric_view is a second instance in inline_lyric_frame, and LyricPanelController is the single place that decides which one is visible and keeps the two in sync.

Changes

area change
LyricPanelController.kt (new) owns both instances, the lyric button state, the fade and colour transitions, and the saved-instance-state key
CompactLyricMetrics.kt (new) compact-mode design constants in one place instead of magic numbers
LyricsView.kt adds isCompactMode; stops reaching up into FullBottomSheet (the host injects onFullPlayerVisibilityRequest); compact mode forces zero padding
NewLyricsView.kt, LegacyLyricsAdapter.kt, LyricPaddingDecoration.kt compact scaling of text size, line spacing and item padding
FullBottomSheet.kt every direct bottomSheetFullLyricView.* call now goes through the controller
layout/, layout-w600dp-land/ new inline_lyric_frame + inline_lyric_view
ic_art_track.xml (new) the lyric button was using ic_collections_bookmark - a bookmark glyph on an action that saves nothing
strings (en, zh-rCN), settings_lyric.xml the new switch

Layout notes

  • Portrait - the frame is bound to the cover's top/bottom, so the lyrics stay inside its vertical band. The controls sit directly under the cover and are drawn above it, so extending the frame downwards would only push the lyrics behind them.
  • Landscape - the frame spans the full height minus 16 dp, because the area under the cover is empty there. Its right edge is controls.left - 12dp, so it never enters the play-button column.
  • Both orientations - horizontal text inset is the frame margin plus CompactLyricMetrics.HORIZONTAL_PADDING_DP (16 dp, which scales with the lyric font size).

Scope

13 files, all in the lyrics display path plus the lyric button's icon. No build
scripts, no root-level config, no unrelated settings screens.

Screenshots

Portrait Portrait with center alignment Landscape
Screenshot_2026-09-23-00-12-08-89_7b63ba6ba855e67dd5ee1b08e9300b77 Screenshot_20260923-000848_留声机 Screenshot_2026-09-23-00-12-22-73_7b63ba6ba855e67dd5ee1b08e9300b77

Lyrics no longer have to cover the whole player: with "Fullscreen lyrics"
turned off they are drawn inside the album cover area instead, so the artwork
stays visible while reading them.

* CompactLyricMetrics holds the compact-mode design constants (text size,
  spacing, horizontal padding, decoration scaling)
* LyricPanelController owns both LyricsView instances and is now the single
  entry point the sheet talks to. The inline view is a second instance living
  in inline_lyric_frame rather than a reparented one: ConstraintSet cannot move
  a view between parents, and the sheet itself goes GONE in fullscreen mode, so
  a single view inside it would be hidden by its own ancestor
* LyricsView no longer reaches up into FullBottomSheet to toggle the sheet; the
  host injects onFullPlayerVisibilityRequest, and the sheet resolves its own
  fullscreen view from onAttachedToWindow so the lazy lookup stays deferred
* the lyric button now uses ic_art_track, it was borrowing ic_collections_bookmark
  and that glyph reads as "save", not "show lyrics"
* inline_lyric_frame added to both layout/ and layout-w600dp-land/ variants
SteveZMTstudios added a commit to SteveZMTstudios/Gramophone that referenced this pull request Sep 22, 2026
…tial-lyrics-display

feat(player):Add compact lyrics display inside the album cover
@nift4

nift4 commented Oct 8, 2026

Copy link
Copy Markdown
Member

We are rewriting the app in compose, this PR is no longer applicable against that branch sadly. It would likely need complete rework - I'm very sorry, but I cannot do said rework myself due to time constraint. I'm also not yet sure about the visual design, I think I will need to seek some input from other people first before making a decision. The compose-rewrite branch still needs some time, but once PR #1043 is merged, let me know and I'll think about design.

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