An efficient TabLayout implemented in Jetpack Compose 🚀

Overview

MagicTabLayout


An efficient TabLayout library implemented in Jetpack Compose 🚀


License API repo size
forks stars

Anatomy

banner_magic_tab_layout

  1. MagicTabLayout
  2. tabIndicatorColor (Optional, default value: blue)
  3. MagicTabItem
  4. MagicTabItem title

Including in your project

Gradle

Add below codes to your root build.gradle file (not your module build.gradle file).

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

And add a dependency code to your module's build.gradle file.

dependencies {
    implementation 'com.github.iamageo:MagicTabLayout:1.0.1'     
}

Basic Usage

Add in you Activity file.

/* specify your tabs */
val tabs = listOf(
    MagicTabItem(title = "Home") { TabItemTest(item = "tab1") },
    MagicTabItem(title = "Favorites") { TabItemTest(item = "tab2") },
    MagicTabItem(title = "Settings") { TabItemTest(item = "tab3") },
)

Column() {
    MagicTabLayout(
        tabIndicatorColor = Color.Blue,
        tabColor = Color.White,
        tabList = tabs,
    )
}

/* in this case TabItemTest contains bellow composable function, but you can pass your functions */
@Composable
fun TabItemTest(item: String) {
    Column(
        modifier = Modifier.fillMaxSize(),
        verticalArrangement = Arrangement.Center,
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Text(
            text = item,
            color = Color.Black,
        )
    }
}

License

    Copyright 2022 Geovani Amaral

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

You might also like...
A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose
A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose

A small and simple, yet fully fledged and customizable navigation library for Jetpack Compose

A small navigation library for Jetpack Compose with state saving, backstack and animations support.

A small navigation library for Jetpack Compose with state saving, backstack and animations support.

A lightweight library to help you navigate in compose with well typed functions.

TypedNavigation A lightweight library to help you navigate in compose with well typed functions. Installation: You can add this library to your projec

CustomNavigationDrawer - Custom Navigation Drawer with compose
CustomNavigationDrawer - Custom Navigation Drawer with compose

An easy sample to explore navigation component and navigation drawer from Jetpac

Navigation for compose multiplatform

Navigation for compose multiplatform

A simple, highly customizable compose navigation component for Android & Desktop platform.
A simple, highly customizable compose navigation component for Android & Desktop platform.

介绍 一个简单并提供高度扩展功能的 Compose 导航组件,同时支持 Android 和 Desktop 平台。 常用功能 使用 下载 // Android implementation("io.github.succlz123:compose-screen-android:0.0.1") //

An efficient TabLayout library implemented with RecyclerView.
An efficient TabLayout library implemented with RecyclerView.

RecyclerTabLayout An efficient TabLayout library implemented with RecyclerView. Features Efficient when having many tabs Easy setup with ViewPager (sa

An efficient TabLayout library implemented with RecyclerView.
An efficient TabLayout library implemented with RecyclerView.

RecyclerTabLayout An efficient TabLayout library implemented with RecyclerView. Features Efficient when having many tabs Easy setup with ViewPager (sa

➕ An efficient and beaufitul Multi Float action button library based on Twitter implemented in Jetpack Compose 🚀
➕ An efficient and beaufitul Multi Float action button library based on Twitter implemented in Jetpack Compose 🚀

Multi Float Action Button ➕ An efficient and beaufitul Multi Float action button library based on Twitter implemented in Jetpack Compose 🚀 Including

An E-Commerce android App whose frontend is implemented using Kotlin & XML files and backend/database is implemented using My SQL & PHP files

An E-Commerce android App whose frontend is implemented using Kotlin & XML files and backend/database is implemented using My SQL & PHP files

Jetpack-compose-animations-examples - Cool animations implemented with Jetpack compose
Jetpack-compose-animations-examples - Cool animations implemented with Jetpack compose

Jetpack-compose-animations-examples This repository consists of 4 animations: St

Android library for fluid tablayout animation as seen on Snapchat.
Android library for fluid tablayout animation as seen on Snapchat.

SnapTabLayout Show some ❤️ and star the repo to support the project This library is the implementation of TabLayout as seen on popular messaging app S

Android library for fluid tablayout animation as seen on Snapchat.
Android library for fluid tablayout animation as seen on Snapchat.

SnapTabLayout Show some ❤️ and star the repo to support the project This library is the implementation of TabLayout as seen on popular messaging app S

An Android TabLayout Lib
An Android TabLayout Lib

FlycoTabLayout 中文版 An Android TabLayout Lib has 3 kinds of TabLayout at present. SlidingTabLayout: deeply modified from PagerSlidingTabStrip. new adde

ViewPager2&TabLayout:拓展出一个选中放大效果
ViewPager2&TabLayout:拓展出一个选中放大效果

ViewPager2正式推出已经一年多了,虽然不如3那样新潮,但是也不如老前辈ViewPager那样有众多开源库拥簇,比如它的灵魂伴侣TabLayout明显后援不足,好在TabLayout自身够硬!

Android自定义控件之RecyclerView打造万能ViewPager TabLayout(仿今日头条Tab滑动、Tab多布局、indicator蠕动、自定义indicator、文字颜色渐变、自定义Fragment)
Android自定义控件之RecyclerView打造万能ViewPager TabLayout(仿今日头条Tab滑动、Tab多布局、indicator蠕动、自定义indicator、文字颜色渐变、自定义Fragment)

文章目录 GitHub:https://github.com/AnJiaoDe/TabLayoutNiubility CSDN:https://blog.csdn.net/confusing_awakening/article/details/107635695 该轮子特异功能如下: 使用方法 注意

Added support to modify text size and indicator width based on the original TabLayout.
Added support to modify text size and indicator width based on the original TabLayout.

XTabLayout——可修改选中项字体大小和指示器长度的TabLayout XTabLayout是基于design包中的TabLayout进行了功能的扩展,在保留原有功能的基础上,增加了修改选中项字体大小、修改指示器长度以及限制屏幕显示范围内显示的Tab个数。 集成步骤: 1.添加XTabLayo

A lightweight synchronizer between Android's TabLayout and RecyclerView.

TabSync A lightweight synchronizer between Android's TabLayout and RecyclerView. The behavior of the synchronizer is that as you scroll through the Re

Super Heroes Kata implemented using Jetpack Compose and Screenshot Testing.
Super Heroes Kata implemented using Jetpack Compose and Screenshot Testing.

KataSuperHeroes with Jetpack Compose We are here to learn about Jetpack Compose. We are going to use Jetpack Compose Testing Tools to interact with th

Comments
  • Bump accompanist-pager from 0.13.0 to 0.28.0

    Bump accompanist-pager from 0.13.0 to 0.28.0

    Bumps accompanist-pager from 0.13.0 to 0.28.0.

    Release notes

    Sourced from accompanist-pager's releases.

    v0.28.0 🌈

    What’s Changed

    v0.27.1 🌈

    What’s Changed

    v0.27.0 🌈

    What’s Changed

    v0.26.5-rc 🌈

    What’s Changed

    v0.26.4-beta 🌈

    What’s Changed

    v0.26.3-beta 🌈

    What’s Changed

    ... (truncated)

    Commits
    • cb76e41 Merge pull request #1421 from google/ben/release
    • 61164f3 v0.28.0
    • 98fc70a Merge pull request #1410 from ricknout/main
    • 98e8c81 Add back old AppCompat Theme artifact with deprecation
    • d159194 Merge pull request #1412 from google/av/fix-adaptive-bug-report-name
    • c775658 Fix adaptive bug report name
    • 539bead Merge branch 'main' into main
    • 762d09f Add font assets license
    • 8f2210f Address theme adapter review feedback
    • 8ce3ce4 Merge pull request #1392 [Test Harness] Add test harness library
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump accompanist-pager-indicators from 0.13.0 to 0.28.0

    Bump accompanist-pager-indicators from 0.13.0 to 0.28.0

    Bumps accompanist-pager-indicators from 0.13.0 to 0.28.0.

    Release notes

    Sourced from accompanist-pager-indicators's releases.

    v0.28.0 🌈

    What’s Changed

    v0.27.1 🌈

    What’s Changed

    v0.27.0 🌈

    What’s Changed

    v0.26.5-rc 🌈

    What’s Changed

    v0.26.4-beta 🌈

    What’s Changed

    v0.26.3-beta 🌈

    What’s Changed

    ... (truncated)

    Commits
    • cb76e41 Merge pull request #1421 from google/ben/release
    • 61164f3 v0.28.0
    • 98fc70a Merge pull request #1410 from ricknout/main
    • 98e8c81 Add back old AppCompat Theme artifact with deprecation
    • d159194 Merge pull request #1412 from google/av/fix-adaptive-bug-report-name
    • c775658 Fix adaptive bug report name
    • 539bead Merge branch 'main' into main
    • 762d09f Add font assets license
    • 8f2210f Address theme adapter review feedback
    • 8ce3ce4 Merge pull request #1392 [Test Harness] Add test harness library
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump org.jetbrains.kotlin.android from 1.5.31 to 1.7.22

    Bump org.jetbrains.kotlin.android from 1.5.31 to 1.7.22

    Bumps org.jetbrains.kotlin.android from 1.5.31 to 1.7.22.

    Release notes

    Sourced from org.jetbrains.kotlin.android's releases.

    Kotlin 1.7.22

    This is a technical release. It doesn't contain any fixes that aren't included in Kotlin 1.7.21. Version 1.7.22 of the Kotlin plugin will not be available for downloading or installing in any IDEs.

    Checksums

    File Sha256
    kotlin-compiler-1.7.22.zip 9db4b467743c1aea8a21c08e1c286bc2aeb93f14c7ba2037dbd8f48adc357d83
    kotlin-native-linux-x86_64-1.7.22.tar.gz dd004d520056aba67f2955a3bec5af75f8f2d78b179d4b5f733a77e3eef57aff
    kotlin-native-macos-x86_64-1.7.22.tar.gz 153fa411fa8c993ce2635e2504e9b102cb05362cc794b66ef9def26a78b427b5
    kotlin-native-macos-aarch64-1.7.22.tar.gz 4ffcd76c77cc824eff8addd5e2a73da4f3bbd3584fa9ef282b3f669c45426b1e
    kotlin-native-windows-x86_64-1.7.22.zip 3bccd23479848ec61c56ed5760010456d17acbe88a00a1f10fb38eae256f2e92

    Kotlin 1.7.21

    Changelog

    Compiler

    • KT-54463 Delegating to a field with a platform type causes java.lang.NoSuchFieldError: value$delegate
    • KT-54509 Ir Interpreter: unable to evaluate string concatenation with "this" as argument
    • KT-54004 Builder type inference does not work correctly with variable assignment and breaks run-time
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-54615 JVM: Internal error in file lowering: java.lang.AssertionError: Error occurred while optimizing an expression
    • KT-54581 JVM: "VerifyError: Bad type on operand stack" with generic inline function and when inside try-catch block
    • KT-53146 JVM IR: unnecessary checkcast of null leads to NoClassDefFoundError if the type isn't available at runtime
    • KT-54600 NPE on passing nullable Kotlin lambda as Java's generic SAM interface with super type bound
    • KT-54707 "VerifyError: Bad type on operand stack" in inline call chain on a nullable array value
    • KT-54650 Binary incompatible ABI change in Kotlin 1.7.20
    • KT-54802 "VerifyError: Bad type on operand stack" for inline functions on arrays

    Native. Runtime. Memory

    • KT-54498 Deprecation message of 'FreezingIsDeprecated' is not really helpful

    Tools. Gradle. Multiplatform

    • KT-54387 Remove MPP alpha stability warning
    • KT-48436 False positive "The Kotlin source set androidAndroidTestRelease was configured but not added to any Kotlin compilation"

    Tools. JPS

    • KT-45474 False positive NO_ELSE_IN_WHEN on sealed class with incremental compilation

    Checksums

    File Sha256

    ... (truncated)

    Changelog

    Sourced from org.jetbrains.kotlin.android's changelog.

    1.7.21

    Compiler

    • KT-54463 Delegating to a field with a platform type causes java.lang.NoSuchFieldError: value$delegate
    • KT-54509 Ir Interpreter: unable to evaluate string concatenation with "this" as argument
    • KT-54004 Builder type inference does not work correctly with variable assignment and breaks run-time
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-54615 JVM: Internal error in file lowering: java.lang.AssertionError: Error occurred while optimizing an expression
    • KT-54581 JVM: "VerifyError: Bad type on operand stack" with generic inline function and when inside try-catch block
    • KT-53146 JVM IR: unnecessary checkcast of null leads to NoClassDefFoundError if the type isn't available at runtime
    • KT-54600 NPE on passing nullable Kotlin lambda as Java's generic SAM interface with super type bound
    • KT-54707 "VerifyError: Bad type on operand stack" in inline call chain on a nullable array value
    • KT-54650 Binary incompatible ABI change in Kotlin 1.7.20
    • KT-54802 "VerifyError: Bad type on operand stack" for inline functions on arrays

    Native. Runtime. Memory

    • KT-54498 Deprecation message of 'FreezingIsDeprecated' is not really helpful

    Tools. Gradle. Multiplatform

    • KT-54387 Remove MPP alpha stability warning
    • KT-48436 False positive "The Kotlin source set androidAndroidTestRelease was configured but not added to any Kotlin compilation"

    Tools. JPS

    • KT-45474 False positive NO_ELSE_IN_WHEN on sealed class with incremental compilation

    1.7.20

    Analysis API

    • KT-52667 FIR IDE: fun interfaces (SAM interfaces) are not properly resolved
    • KT-52136 FIR: Implicit type declaration from the other module cannot be used for overloading

    Analysis API. FE1.0

    • KT-51962 Analysis API: Finish Analysis API for FE1.0

    Analysis API. FIR

    • KT-52779 FIR IDE: Import Optimizer cannot handle generic type qualifiers
    • KT-50236 Fix OOB modification trackers for non-Kotlin code
    • KT-51240 Analysis API: KtAnalysisSession for a specific module cannot create a symbol for PSI that cannot be seen from that module.
    • KT-50868 Analysis API: decompiled type aliases are not resolved

    Compiler

    ... (truncated)

    Commits
    • be3c5a5 Instruction for building 1.7.21 release
    • 80eb82a Instructions for building 1.7.20 release
    • cb51803 Scripts for building Kotlin repository
    • 7784d10 Change bootstrap to 1.7.21-release-254
    • e7f77e9 Keep track of array types in OptimizationBasicInterpreter
    • 7deaab9 Edit changelog for 1.7.21
    • 0b49dc2 Fix binary compatibility for inlined local delegated properies
    • 90b3e21 Advance bootstrap to 1.7.21
    • c55a197 Edit changelog for 1.7.21
    • b1b18c2 Add regression test for KT-54707
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(1.0.1)
Owner
Geovani Amaral
Android developer & Open Source ❤
Geovani Amaral
Memory efficient android library for managing individual fragment backstack.

fragstack : Android library for managing individual fragment backstack. An Easy to use library for managing individual fragment back stack as Instagra

Abhishesh 21 Feb 6, 2021
Ahmad Shahwaiz 1 Jan 26, 2022
Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android - Bottom App Bar with Bottom Navigation in Jetpack compose

Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android This is simple

Shruti Patel 1 Jul 11, 2022
Android multi-module navigation built on top of Jetpack Navigation Compose

MultiNavCompose Android library for multi-module navigation built on top of Jetpack Navigation Compose. The goal of this library is to simplify the se

Jeziel Lago 21 Dec 10, 2022
🛸Voyager is a pragmatic navigation library built for, and seamlessly integrated with, Jetpack Compose.

Voyager is a pragmatic navigation library built for, and seamlessly integrated with, Jetpack Compose.

Adriel Café 831 Dec 26, 2022
A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

Kaustubh Patange 88 Dec 11, 2022
Implementing bottom navigation in jetpack compose

Compose-Bottom-Navigation Implementing bottom navigation in jetpack compose Add the Navigation dependency Open the app's build file, found at app/buil

Steve Chacha 5 Dec 26, 2021
Jetpack Compose BottomDrawerScaffold (Material Bottom Drawer)

BottomDrawerScaffold Current Compose Version: 1.0.2 Compose BottomDrawerScaffold which implements the Material Bottom Drawer https://material.io/compo

Alexander Karkossa 8 Dec 28, 2022
New style for app design simple bottom navigation with side navigation drawer UI made in Jetpack Compose.😉😎

BottomNavWithSideDrawer New style for app design simple bottom navigtaion with side navigation drawer UI made in Jetpack Compose. ?? ?? (Navigation Co

Arvind Meshram 5 Nov 24, 2022
A library that you can use for bottom navigation bar. Written with Jetpack Compose

FancyBottomNavigationBar A library that you can use for bottom navigation bar. W

Alperen Çevlik 3 Jul 27, 2022