{"id":28063557,"url":"https://github.com/austin17ng/austin-tab","last_synced_at":"2025-05-12T12:13:12.189Z","repository":{"id":258193978,"uuid":"870531495","full_name":"austin17ng/austin-tab","owner":"austin17ng","description":"An adaptive and lightweight tab layout for Android","archived":false,"fork":false,"pushed_at":"2025-04-11T01:41:18.000Z","size":667,"stargazers_count":36,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T12:13:08.825Z","etag":null,"topics":["android","segmentedcontrol","tablayout"],"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/austin17ng.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,"zenodo":null}},"created_at":"2024-10-10T08:02:27.000Z","updated_at":"2025-05-04T16:05:52.000Z","dependencies_parsed_at":"2024-10-18T00:36:45.472Z","dependency_job_id":"7961f21e-6447-496b-8c2e-b9792f334fd2","html_url":"https://github.com/austin17ng/austin-tab","commit_stats":null,"previous_names":["austin17ng/austin-tab"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin17ng%2Faustin-tab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin17ng%2Faustin-tab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin17ng%2Faustin-tab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austin17ng%2Faustin-tab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austin17ng","download_url":"https://codeload.github.com/austin17ng/austin-tab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253736101,"owners_count":21955784,"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":["android","segmentedcontrol","tablayout"],"created_at":"2025-05-12T12:13:06.708Z","updated_at":"2025-05-12T12:13:12.174Z","avatar_url":"https://github.com/austin17ng.png","language":"Kotlin","readme":"# Austin Tab\n:sheep: An adaptive and lightweight tab layout for Android :sheep:\n\n![Release](https://jitpack.io/v/austin17ng/austin-tab.svg)\n![Monthly download statistics](https://jitpack.io/v/austin17ng/austin-tab/month.svg)\n\n\n\u003cimg src=\"/images/examples.png\" alt=\"drawing\" width=\"500\"/\u003e\n\n## Examples\n### A basic example\n1. Add `AustinTabView` to a layout file\n\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cLinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\u003e\n    \n    \u003cme.austinng.austintab.AustinTabView\n        android:id=\"@+id/austinTabView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"8dp\"\n        app:indicator_style=\"SEGMENTED_CONTROL\"\n        app:tab_container_padding=\"4dp\"\n        app:tab_style=\"ADAPTIVE\"\n        app:tab_badge_font=\"@font/ubuntu_medium\"\n        app:tab_text_font_active=\"@font/ubuntu_medium\"\n        app:tab_text_font_inactive=\"@font/ubuntu_regular\" /\u003e\n        \n\u003c/LinearLayout\u003e\n```\n\n2. In your activity\n\n```\naustinTabView.setData(\n    listOf(\n        TabData(\"Home\", icon = R.drawable.ic_home),\n        TabData(\"Notifications\", badge = \"3\"),\n        TabData(\"Profile\"),\n    )\n)\n\naustinTabView.setTabSelectedListener { index -\u003e\n    Log.d(\"AustinTabView\", \"Index $index selected\")\n}\n\naustinTabView.setTabReselectedListener { index -\u003e\n    Log.d(\"AustinTabView\", \"Index $index reselected\")\n}\n\naustinTabView.setTabUnSelectedListener { index -\u003e\n    Log.d(\"AustinTabView\", \"Index $index unselected\")\n}\n```\n\n### Other examples\nYou can find additional examples of usage and customization [here](app/src/main/java/me/austinng/austintab).\n\n## Anatomy\n\n![Anatomy](/images/anatomy.png \"Anatomy\")\n\n## Installation\n\n1. Add `Jitpack Repository` to your `settings.gradle` file:\n\n```\nmaven { url 'https://jitpack.io' }\n```\n\n2. In your app’s `build.gradle` file, add the dependency:\n\n```\ndependencies {\n\timplementation 'com.github.austin17ng:austin-tab:1.0.0'\n}\n```\n\n## List of attributes\n\n| Attributes  |                                              Default value                                               | Description |\n| ------------- |:--------------------------------------------------------------------------------------------------------:|:-------------:|\n| `offset`    |                                                  `16dp`                                                  | Space between the tab and screen edges   |\n| `enable_auto_scroll`     |                                                  `true`                                                  | Automatically centers the selected tab on the screen.  |\n|   `enable_animation`   |                                                 `false`                                                  |   Enables tab translation animation  |\n|   `tab_container_background`   |        ![](/images/tab_bg.png \"\") (for `TAB`), ![](/images/segmented_bg.png \"\") (for `SEGMENTED`)        |    Background of the tab container |\n|     `tab_container_padding` |                                                  `0dp`                                                   |   Padding for the tab container  |\n|  `tab_style`    |                                                `ADAPTIVE`                                                | Tab style: `ADAPTIVE` or `EQUAL`    |\n|     `indicator_style` |                                                  `TAB`                                                   | Indicator style: `TAB` or `SEGMENTED_CONTROL`    |\n|    `indicator_src`  | ![](/images/tab_indicator.png \"\") (for `TAB`), ![](/images/segmented_indicator.png \"\") (for `SEGMENTED`) |    Drawable resource for the indicator|\n|`indicator_height`|                                                  `2dp`                                                   |Height of the indicator (only for `indicator_style = TAB`)|\n|`tab_vertical_padding`|                                                  `6dp`                                                   |Vertical padding for tabs|\n|`tab_horizontal_padding`|                                                  `16dp`                                                  |Horizontal padding for tabs|\n|`tab_text_color_active`|            ![](/images/white.png \"\") (for `TAB`), ![](/images/black.png \"\") (for `SEGMENTED`)            |Text color of the active tab|\n|`tab_text_color_inactive`|                                                 ![](/images/black.png \"\")                                                 |Text color of inactive tabs|\n|`tab_text_font_active`|                                                  `none`                                                  |Font for the active tab|\n|`tab_text_font_inactive`|                                                  `none`                                                  |Font for inactive tabs|\n|`tab_text_size`|                                                  `14sp`                                                  |Size of the tab text|\n|`tab_icon_active_color`|            ![](/images/white.png \"\") (for `TAB`), ![](/images/black.png \"\") (for `SEGMENTED`)            |Color for the active tab icon|\n|`tab_icon_inactive_color`|                                        ![](/images/black.png \"\")                                         |Color for the inactive tab icon|\n|`tab_badge_text_size`|                                                  `10sp`                                                  |Text size of the badge|\n|`tab_badge_font`|                                                  `none`                                                  |Font for the tab badge|\n|`tab_badge_source`|                                        ![](/images/badge.png \"\")                                         |Drawable resource for the badge|\n|`tab_badge_color`|                                        ![](/images/white.png \"\")                                         |Text color of the badge|\n|`tab_badge_position`|                                                  `TOP`                                                   |Position of the badge: `TOP`, `CENTER`, or `BOTTOM`|\n\n## List of functions\n\n`setData(data: List\u003cTabData\u003e)`\n\n`setTabSelectedListener(listener: (index: Int) -\u003e Unit)`\n\n`setTabReselectedListener(listener: (index: Int) -\u003e Unit)`\n\n`setTabUnSelectedListener(listener: (index: Int) -\u003e Unit)`\n\n`attachWithViewPager2(viewPager2: ViewPager2)`\n\n`getIndex(): Int`\n\n`setIndex(index: Int)`\n\n## Contributing\n\nFeel free to contribute by submitting issues or pull requests. And please ensure that all pull requests are checked out from the `master` branch.\n\n## Related Projects  \n- [Austin Segmented Control](https://github.com/austin17ng/Austin_SegmentedControl) – 🐑 A segmented control (tabs) library for Jetpack Compose 🐑.\n\n## License\n\nAustin Tab is licensed under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustin17ng%2Faustin-tab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustin17ng%2Faustin-tab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustin17ng%2Faustin-tab/lists"}