{"id":13642675,"url":"https://github.com/ShamylZakariya/StickyHeaders","last_synced_at":"2025-04-20T20:32:26.797Z","repository":{"id":49392276,"uuid":"56408159","full_name":"ShamylZakariya/StickyHeaders","owner":"ShamylZakariya","description":"Adapter and LayoutManager for Android RecyclerView which enables sticky header positioning.","archived":true,"fork":false,"pushed_at":"2019-10-12T22:31:33.000Z","size":4113,"stargazers_count":1403,"open_issues_count":66,"forks_count":185,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-01-18T22:36:31.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShamylZakariya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-16T22:20:07.000Z","updated_at":"2024-12-30T10:16:01.000Z","dependencies_parsed_at":"2022-09-12T21:51:15.121Z","dependency_job_id":null,"html_url":"https://github.com/ShamylZakariya/StickyHeaders","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShamylZakariya%2FStickyHeaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShamylZakariya%2FStickyHeaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShamylZakariya%2FStickyHeaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShamylZakariya%2FStickyHeaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShamylZakariya","download_url":"https://codeload.github.com/ShamylZakariya/StickyHeaders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249958857,"owners_count":21351728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:34.800Z","updated_at":"2025-04-20T20:32:24.924Z","avatar_url":"https://github.com/ShamylZakariya.png","language":"Java","funding_links":[],"categories":["Header"],"sub_categories":[],"readme":"# StickyHeaders\nAdapter and LayoutManager for Android RecyclerView which enables sticky header positioning.\n\n---\n\n## Download\nminSdkVersion: 14\n```\ncompile 'org.zakariya.stickyheaders:stickyheaders:0.7.10'\n```\n\n---\n\nStickyHeaders are section headers in a RecyclerView which are positioned \"stickily\" to the top of the scrollview during scrolling. A common use-case is an address book where the list of people's last names are grouped into sections by the first letter of the last name, and the header for each section shows that letter.\n\n**For example:**\n\n![AddressBookSample](readme-assets/video-addressbook.gif)\n\nStickyHeaders also supports a callback (`org.zakariya.stickyheaders.StickyHeaderLayoutManager.HeaderPositionChangedCallback`) when a header becomes \"sticky\" or returns to normal positioning. For example, it is used here to set the elevation on the header to cast a subtle drop shadow when the header is in sticky position.\n\n**For example:**\n\n![CallbacksSample](readme-assets/video-callbacks.gif)\n\n## Usage\n\nTo use StickyHeaders, you need to do two things.\n\n1. Implement an adapter by subclassing `org.zakariya.stickyheaders.SectioningAdapter`\n2. Assign a `org.zakariya.stickyheaders.StickyHeaderLayoutManager` to your recyclerview.\n3. When handling modifications to your dataset, *never* call the `RecyclerView.Adapter::notify*` methods, instead, call the corresponding methods in `org.zakariya.stickyheaders.SectioningAdapter::notifySection*`. The reason for this is `SectioningAdapter` maintains internal state, and the `notifySection*` methods are tailored for adding and removing sections, adding and removing items from sections, etc.\n\n## Notes\n\n1. StickyHeaders uses `androidx.recyclerview.*`\n2. You can use sectioning adapter with a normal `androidx.recyclerview.widget.LinearLayoutManager`. it works fine, and could be a good way to implement a list like at the root of Android's Settings app.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShamylZakariya%2FStickyHeaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShamylZakariya%2FStickyHeaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShamylZakariya%2FStickyHeaders/lists"}