{"id":21946814,"url":"https://github.com/efguydan/storytablayout","last_synced_at":"2026-02-27T12:44:33.695Z","repository":{"id":95607348,"uuid":"476071122","full_name":"efguydan/StoryTabLayout","owner":"efguydan","description":"Provides a story-like Tab Layout for your ViewPager, ViewPager2 and other Use Cases","archived":false,"fork":false,"pushed_at":"2023-01-03T18:57:55.000Z","size":2574,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-03T14:02:53.681Z","etag":null,"topics":["android-library","kotlin","story","storytablayout","tablayout","viewpager","viewpager-indicator","viewpager2"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/efguydan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-03-30T22:29:08.000Z","updated_at":"2024-10-11T04:05:56.000Z","dependencies_parsed_at":"2023-04-07T20:18:06.669Z","dependency_job_id":null,"html_url":"https://github.com/efguydan/StoryTabLayout","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/efguydan/StoryTabLayout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efguydan%2FStoryTabLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efguydan%2FStoryTabLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efguydan%2FStoryTabLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efguydan%2FStoryTabLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efguydan","download_url":"https://codeload.github.com/efguydan/StoryTabLayout/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efguydan%2FStoryTabLayout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002406,"owners_count":26083374,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android-library","kotlin","story","storytablayout","tablayout","viewpager","viewpager-indicator","viewpager2"],"created_at":"2024-11-29T04:35:24.970Z","updated_at":"2025-10-10T01:33:00.865Z","avatar_url":"https://github.com/efguydan.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Story Tab Layout\n\n[![Android CI](https://github.com/efguydan/StoryTabLayout/actions/workflows/android.yml/badge.svg)](https://github.com/efguydan/StoryTabLayout/actions/workflows/android.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.efguydan/StoryTabLayout.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.efguydan%22%20AND%20a:%22StoryTabLayout%22)\n\nA library that provides a Story-like Tab Layout for your ViewPager and other usecases\n\n## Preview\n\n\u003cimg src=\"./showcase/sample.gif\" width=300 /\u003e\n\n## Gradle Dependency\n\nStoryTabLayout is hosted on MavenCentral. To add to your project, include `mavenCentral()` to your repositories and then add the dependency to your module’s build.gradle.\n\n```groovy\nimplementation 'io.github.efguydan:StoryTabLayout:\u003cinsert-version-here\u003e'\n```\n\nFor versions, check [here](https://github.com/efguydan/StoryTabLayout/releases) for the releases.\n\n## Usage\n\nAdd `StoryTabLayout` to your layout file.\n\n```xml\n\u003ccom.efedaniel.storytablayout.StoryTabLayout\n  android:id=\"@+id/storyTabLayout\"\n  android:layout_width=\"match_parent\"\n  android:layout_height=\"wrap_content\" /\u003e\n```\n\nThen you need to setup the Story Tab Layout with a `ViewPager`, `ViewPager2`, or with a custom number of Tabs. \n\n```kotlin\nfun setupStoryTabLayout() {\n  // Set up with a ViewPager\n  storyTabLayout.setupWithViewPager(viewPager)\n\n  // Set up with a ViewPager2\n  storyTabLayout.setupWithViewPager2(viewPager2)\n\n  // Set up with Number of Tabs\n  storyTabLayout.setupWithNumberOfTabs(numberOfTabs = 10, initialPage = 5)\n}\n```\n\n\u003eIf you are setting up with a ViewPager / ViewPager2, you should make sure your adapter is setup before calling the setup method.\n\u003e\n\u003eIf you are setting up with Number of Tabs, the initial Page argument is optional and has a default value of 0.\n\nAfter that, you just need to call the start method and voila!\n\n```kotlin\nfun setupStoryTabLayout() {\n  // Start the Story Tab Layout\n  storyTabLayout.start()\n}\n```\n\n## Customization\n\n| Property | XML | Programmaticaly | Default Value |\n| --- | --- | --- | --- |\n| Spacing between Bars | app:barSpacing | barSpacing | 4dp |\n| Bar Corner Radius | app:barCornerRadius | barCornerRadius | 4dp |\n| Bar Duration | app:barDurationInMs | barDurationInMs | 5000 ms |\n| Bar Track Color | app:barTrackColor | barTrackColor | Primary Color |\n| Bar Indicator Color | app:barIndicatorColor | barIndicatorColor | Primary Color (Disabled Alpha) |\n| Animate Bar Snaps | app:animateBarSnaps | animateBarSnaps | false |\n\n## Functionality\n\n- `start()` - Starts the Story Tab Layout\n- `pause()` - Pauses the Current Bar of the Story Tab Layout\n- `resume()` - Resumes the Current Bar of the Story Tab Layout\n- `stop(::Boolean)` - Stops the Story Tab Layout. Takes a boolean argument for whether to keep the bars in an empty state or a filled state\n- `restartCurrentTab()` - Restarts the Current Bar of the Story Tab Layout\n- `jumpToPage(::Int)` - Jumps to a particular Bar the Story Tab Layout.\n\n## License\n\n```\n/**\n * Copyright (c) 2023 EfeDaniel.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefguydan%2Fstorytablayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefguydan%2Fstorytablayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefguydan%2Fstorytablayout/lists"}