# timehop/sticky-headers-recyclerview

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/timehop-sticky-headers-recyclerview).**

3,785 stars · 748 forks · Java · Apache-2.0 · archived

## Links

- GitHub: https://github.com/timehop/sticky-headers-recyclerview
- awesome-repositories: https://awesome-repositories.com/repository/timehop-sticky-headers-recyclerview.md

## Description

This is a library for Android RecyclerView that pins section headers to the top of a scrolling list to maintain navigation context in grouped datasets. It serves as a reusable interface component that adds persistent overlays and visual grouping to native Android list views.

The component functions as a view-recycling layout decorator, reusing view holders to render sticky headers to minimize memory overhead. It includes a layout tool for touch event interception, allowing for click listeners and interactive behaviors on pinned section headers.

The library covers rendering logic for fixing section headers to viewport edges and input handling mechanisms for triggering custom logic when users interact with those headers.

## Tags

### User Interface & Experience

- [RecyclerView Sticky Headers](https://awesome-repositories.com/f/user-interface-experience/sticky-header-pinning/grouped-list-sticky-headers/recyclerview-sticky-headers.md) — Pins category headers to the top of an Android RecyclerView to maintain navigation context in grouped datasets.
- [Sticky Header Pinning](https://awesome-repositories.com/f/user-interface-experience/sticky-header-pinning.md) — Fixes headers to the viewport edges to group data clearly within long scrolling lists. ([source](https://github.com/timehop/sticky-headers-recyclerview#readme))
- [View Recycling Systems](https://awesome-repositories.com/f/user-interface-experience/view-recycling-systems.md) — Reuses existing view holders for sticky headers to reduce memory overhead and allocation during rapid scrolling.
- [List Overlay Renderers](https://awesome-repositories.com/f/user-interface-experience/window-based-overlay-rendering/list-overlay-renderers.md) — Injects a custom drawing layer as a RecyclerView ItemDecoration to render persistent headers over scrolling content.
- [Push-Based Header Displacement](https://awesome-repositories.com/f/user-interface-experience/custom-header-components/push-based-header-displacement.md) — Implements logic to displace a pinned header when the subsequent section header reaches the top of the viewport.
- [Layout-Agnostic Positioning Logic](https://awesome-repositories.com/f/user-interface-experience/drag-and-drop-layout-engines/layout-agnostic-positioning-logic.md) — Calculates header positions independently of specific layout manager implementations by querying scroll offsets.
- [Delegate-Based](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/event-handling-architectures/event-handling/delegate-based.md) — Forwards touch interactions from the header overlay to a controller via a delegate pattern.
- [Interactive List Items](https://awesome-repositories.com/f/user-interface-experience/item-lists/interactive-list-items.md) — Implements interactive, touch-responsive section headers that can trigger custom actions or navigation.
- [Interactive Header Components](https://awesome-repositories.com/f/user-interface-experience/layout-containers/interactive-header-components.md) — Offers a layout tool that allows for touch event interception and click listeners on pinned headers.

### Mobile Development

- [Android UI Components](https://awesome-repositories.com/f/mobile-development/android-ecosystem/android-ui-components.md) — Provides reusable UI components and visual overlays for enhancing native Android list views.
- [Android List Frameworks](https://awesome-repositories.com/f/mobile-development/android-list-frameworks.md) — Extends Android list functionality with a reusable component for persistent overlays and visual grouping.
- [Mobile Data Organization](https://awesome-repositories.com/f/mobile-development/mobile-data-organization.md) — Organizes large mobile datasets into distinct, navigable sections using pinned headers for better context.
