{"id":21385168,"url":"https://github.com/spoqa/stickyscrollview","last_synced_at":"2025-07-13T14:31:57.529Z","repository":{"id":143715145,"uuid":"292179076","full_name":"spoqa/StickyScrollView","owner":"spoqa","description":"StickyScrollView is a scroll view in which columns or rows(TBD) are fixed.","archived":false,"fork":false,"pushed_at":"2020-09-18T09:38:14.000Z","size":12017,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-07T12:52:02.059Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/spoqa.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-02T04:31:20.000Z","updated_at":"2022-07-27T06:32:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0244b85-9c83-49df-bbfb-7af28918b198","html_url":"https://github.com/spoqa/StickyScrollView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spoqa/StickyScrollView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2FStickyScrollView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2FStickyScrollView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2FStickyScrollView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2FStickyScrollView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoqa","download_url":"https://codeload.github.com/spoqa/StickyScrollView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2FStickyScrollView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155777,"owners_count":23719585,"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":["hacktoberfest"],"created_at":"2024-11-22T11:45:25.482Z","updated_at":"2025-07-13T14:31:57.521Z","avatar_url":"https://github.com/spoqa.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StickyScrollView\n\n[![Platform][PlatformBadge]][ProjectGithubUrl]\n[![Download][DownloadBadge]][DownloadUrl]\n\nStickyScrollView is a scroll view in which columns or rows(TBD) are fixed.\n\nWe are planning to add more kinds of scroll views.\n\n## StickyColumnHorizontalScrollView\n\nStickyColumnHorizontalScrollView is a horizontal scroll view that sticks the first column in the recyclerView.\n\nThe sticky column is fixed to the left and you can make the width of the sticky column appear to be adjusted when scrolling. Of course, you can fix the width of the column. It also supports when the header is outside the recyclerView.\n\n### Screenshots\n\n\u003cimg src =\"https://user-images.githubusercontent.com/22957868/93572533-f066bc80-f9d0-11ea-84eb-a58429112948.gif\" width=\"200\" /\u003e \u003cimg src =\"https://user-images.githubusercontent.com/22957868/93572553-f8266100-f9d0-11ea-95b7-621cac1a026c.gif\" width=\"200\" /\u003e \u003cimg src =\"https://user-images.githubusercontent.com/22957868/93572557-f9578e00-f9d0-11ea-88fc-1cf4ab9d9cd0.gif\" width=\"200\" /\u003e\n\n### How to use\n\nFor more details, please see the [bintray](https://bintray.com/beta/#/spoqa/maven/StickyScrollView?tab=overview).\n\nAdd the following gradle dependency.\n\n```groovy\ndependencies {\n    implementation 'com.spoqa.stickyscrollview:StickyScrollView:1.0.1'\n}\n```\n\n### Usage\n\nFor more details, please see the [sample code](StickyScrollView/sample).\n\n#### Warning\n\nThe sticky column must be a below format to work as intended. 😢\n\n```xml\n\u003cLayout\u003e\n    \u003cTextView /\u003e\n    \u003c!-- If the paddingLeft is the same, you can add more TextView --\u003e\n\u003c/Layout\u003e\n```\n\n#### Usage 1\n\nThe width of the sticky column is not adjusted as you scroll.\n\n```xml\n\u003ccom.spoqa.stickyscrollview.StickyColumnHorizontalScrollView\n    android:id=\"@+id/main_scrollView\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:scrollbars=\"horizontal\"\u003e\n\n    \u003candroidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/main_recyclerView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" /\u003e\n\n\u003c/com.spoqa.stickyscrollview.StickyColumnHorizontalScrollView\u003e\n```\n\n```kotlin\noverride fun onCreate(savedInstanceState: Bundle?) {\n    ...\n    main_scrollView.run {\n        recyclerView = main_recyclerView\n    }\n}\n```\n\n#### Usage 2\n\nThe width of the sticky column is adjusted as you scroll.\n\n```kotlin\noverride fun onCreate(savedInstanceState: Bundle?) {\n    ...\n    main_scrollView.run {\n        recyclerView = main_recyclerView\n        minWidthOfStickyColumn = (100 * context.resources.displayMetrics.density).toInt()\n    }\n}\n```\n\n#### Usage 3\n\nThe header is outside the Recycleview.\n\n```xml\n\u003ccom.spoqa.stickyscrollview.StickyColumnHorizontalScrollView\n    android:id=\"@+id/main_scrollView\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:scrollbars=\"horizontal\"\u003e\n\n    \u003cLinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\u003e\n\n        \u003cLinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\u003e\n\n            \u003cLinearLayout\n                android:id=\"@+id/main_stickyHeaderColumnLayout\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\"\u003e\n\n                \u003cTextView\n                    android:layout_width=\"150dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"sticky header\" /\u003e\n\n            \u003c/LinearLayout\u003e\n\n            \u003cTextView\n                android:layout_width=\"100dp\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"header 1\" /\u003e\n\n        \u003c/LinearLayout\u003e\n\n    \u003c/LinearLayout\u003e\n\n    \u003candroidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/main_recyclerView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" /\u003e\n\n\u003c/com.spoqa.stickyscrollview.StickyColumnHorizontalScrollView\u003e\n```\n\n```kotlin\noverride fun onCreate(savedInstanceState: Bundle?) {\n    ...\n    main_scrollView.run {\n        stickyHeaderColumn = main_stickyHeaderColumnLayout\n        recyclerView = main_recyclerView\n        minWidthOfStickyColumn = (100 * context.resources.displayMetrics.density).toInt()\n    }\n}\n```\n\n## License\n\nFor more details, please see the [LICENSE](StickyScrollView/LICENSE).\n\n```\nCopyright 2020 Spoqa\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n[PlatformBadge]:  https://img.shields.io/badge/Platform-Android-blue.svg\n[ProjectGithubUrl]: https://github.com/spoqa/StickyScrollView\n[DownloadBadge]: https://api.bintray.com/packages/spoqa/maven/StickyScrollView/images/download.svg?version=1.0.1\n[DownloadUrl]: https://bintray.com/spoqa/maven/StickyScrollView/1.0.1/link\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fstickyscrollview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoqa%2Fstickyscrollview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fstickyscrollview/lists"}