{"id":13848570,"url":"https://github.com/JimiSmith/PinnedHeaderListView","last_synced_at":"2025-07-12T13:31:38.205Z","repository":{"id":4439758,"uuid":"5578056","full_name":"JimiSmith/PinnedHeaderListView","owner":"JimiSmith","description":"A ListView with pinned section headers for Android","archived":false,"fork":false,"pushed_at":"2015-09-02T01:02:13.000Z","size":924,"stargazers_count":663,"open_issues_count":26,"forks_count":306,"subscribers_count":65,"default_branch":"master","last_synced_at":"2024-08-05T19:35:49.287Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JimiSmith.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-27T22:46:54.000Z","updated_at":"2023-11-03T06:14:27.000Z","dependencies_parsed_at":"2022-09-21T16:13:42.142Z","dependency_job_id":null,"html_url":"https://github.com/JimiSmith/PinnedHeaderListView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimiSmith%2FPinnedHeaderListView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimiSmith%2FPinnedHeaderListView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimiSmith%2FPinnedHeaderListView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimiSmith%2FPinnedHeaderListView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JimiSmith","download_url":"https://codeload.github.com/JimiSmith/PinnedHeaderListView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825266,"owners_count":17529905,"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-04T19:00:52.586Z","updated_at":"2024-11-22T00:30:42.092Z","avatar_url":"https://github.com/JimiSmith.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"PinnedHeaderListView\n================\n\nThis library provides a sectioned ListView with pinned headers. It looks and feels much like the default contacts app does on Android 4.0 and above\n\nA custom adapter is provided which must be extended and used with the custom ListView.\n\nThe usage of this library is simple. You need to create an adapter that extends SectionedBaseAdapter.\n\nThere are 6 methods that need to be overridden:\n\n* ```public Object getItem(int section, int position);```\n* ```public long getItemId(int section, int position);```\n* ```public int getSectionCount();```\n* ```public int getCountForSection(int section);```\n* ```public View getItemView(int section, int position, View convertView, ViewGroup parent);```\n* ```public View getSectionHeaderView(int section, View convertView, ViewGroup parent);```\n\n```getItemView``` and ```getSectionHeaderView``` should be treated as you would the ```getItemView``` method from a normal Adapter.\nThe same goes for ```getItem``` and ```getItemId```.\n\n```getSectionCount``` and ```getCountForSection ```replace the ```getCount()``` method from a standard adapter.\nYou should return the number of sections in your list in ```getSectionCount``` and the number of items in a section in ```getCountForSection```.\n\nIn addition to these methods, there are a few others you may override:\n\n* ```public int getItemViewType(int section, int position);```\n* ```public int getItemViewTypeCount();```\n* ```public int getSectionHeaderViewType(int section);```\n* ```public int getSectionHeaderViewTypeCount();```\n\nThese replace the ```getViewTypeCount() and getItemViewType(int position)``` methods from a standard adapter\n\nNote that you can return the same ItemViewType for a header and a non header and these will be cached seperately by the underlying ListView.  \nThat is, you will never get a header view passed in as the convertView in ```public View getItemView(int section, int position, View convertView, ViewGroup parent);```,\nnor will you get an item view passed in as the convertView in ```public View getSectionHeaderView(int section, View convertView, ViewGroup parent);```\n\nSee the provided example for more details.\n\nLicense\n-------\nCopyright (c) 2012, James Smith  \nAll rights reserved.  \n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:  \n* Redistributions of source code must retain the above copyright\n  notice, this list of conditions and the following disclaimer.  \n* Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.  \n* Neither the name of the \u003corganization\u003e nor the\n  names of its contributors may be used to endorse or promote products\n  derived from this software without specific prior written permission.  \n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL James Smith BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJimiSmith%2FPinnedHeaderListView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJimiSmith%2FPinnedHeaderListView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJimiSmith%2FPinnedHeaderListView/lists"}