Skip to content

Android: Add Sticky Section Headers to Songs List (Sort-Aware, Clickable) #323

Description

@YBTopaz8
  • Description

Implement sticky section headers in the Android songs list to improve navigation and sorting clarity. Headers should adapt to current sort mode and support user interaction.

  • Scope

Android native only (RecyclerView / Views)
Not MAUI, not cross-platform

  • Requirements

Sticky Headers
Headers remain pinned while scrolling
Implement using RecyclerView + ConcatAdapter + ItemDecoration
No third-party libraries

Dynamic Header Grouping should be derived from the sort directive applied in TQL.
DESC / ASC played→ date sections
Asc / DESC title→ A–Z sections for title etc

SHUFFLE → single static header: "Shuffle"

  • Clickable Headers
    Header tap opens a context menu (BottomSheet or PopupMenu)

Menu actions:
Jump to section
Change sort mode
Exit shuffle
Scroll to top
Scroll to current playing song
Jump List Support

Precompute section → adapter position mapping
Smooth scroll to selected section
Performance
No recomputation during scroll
Headers derived once per dataset change
Implementation Notes

Use ConcatAdapter for headers + songs
Headers are real ViewHolders
Sticky behavior via custom ItemDecoration
Sorting rebuilds section model and adapters
Acceptance Criteria
Headers stick correctly under toolbar
Correct grouping for all sort modes
Shuffle shows only one header
Header menu opens reliably
Jump navigation is accurate

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions