Android library for fluid tablayout animation as seen on Snapchat.

Overview

SnapTabLayout Tweet

Show some ❤️ and star the repo to support the project

CircleCI Download Android Arsenal Material Up Android_Weekly

This library is the implementation of TabLayout as seen on popular messaging app Snapchat Snapchat.com.

It can be used to animate Three or Five tabs.

👏 Demo

snaptablayout demo 1 snaptablayout demo 2

Contents

💻 Installation

 implementation 'com.fridayof1995.tabanimation:SnapTablayout:0.0.7'

Usage

Step 1

<com.fridayof1995.tabanimation.SnapTabLayout
        android:id="@+id/tabLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
	.
	.				     
	custom:numOfTabs="three"
        />

Step 2

  • Tab Number (Required)

This parameter specifies the number of tabs required:

setNumOfTabs(SnapTabLayout.NumOfTabs.THREE);
or
setNumOfTabs(SnapTabLayout.NumOfTabs.FIVE);
  • Setting the icons (Required)

This parameter specifies the icons to be inflated: All of the below are ImageButtons so you can set image, background etc. tab_name_explain

tabLayout.smallCenterButton.setImageResource()
tabLayout.largeCenterButton.setImageResource()
tabLayout.startButton.setImageResource()
tabLayout.endButton.setImageResource()

//Below required only when using five tabs.
tabLayout.midStart.setImageResource()
tabLayout.midEnd.setImageResource()

📐 Customization

  • Background (Optional)

This parameter sets the background in extended and collapsed tab mode:

tabLayout.setBackgroundCollapsed(R.drawable.tab_gradient_collapsed) // By default black fall gradient.
tabLayout.setBackgroundExpanded(R.drawable.tab_gradient_expanded)
  • Color Transition in Icons (Optional)

This parameter sets the ColorFilter in extended and collapsed tab mode:

// When the layout moves from expanded to collapsed: Icons color transitions from white to black.
tabLayout.setTransitionIconColors(R.color.white, R.color.black)

  • Color Transition in ViewPager Background (Optional)

This parameter gives a smooth color transition to the background of viewpager as seen in demo:

tabLayout.setVpTransitionBgColors(LeftSideColor: android.R.color.holo_purple
                , CenterColor: android.R.color.black
                , RightSideColor: android.R.color.holo_orange_dark)

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

👨 Developed By

Niranjan Kurambhatti

📃 License

Copyright 2018 Niranjan Kurambhatti

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.
Comments
  • How to use the Kotlin libraries in Java projects written for Android

    How to use the Kotlin libraries in Java projects written for Android

    I intended to use the SnapTablayout library but I did not add to the project and I wanted to know how can I add that library to a project written in Java? (How to use the Kotlin libraries in Java projects written for Android)

    opened by sajjadkhazaee 3
  • [Enablement]

    [Enablement]

    As an engineer, I want to blah blah, so that I can blah blah.

    Description

    This is a long description.

    Helpful Links

    Some helpful links.

    Checklist

    • [ ] Requires QA testing
    Medium Priority 
    opened by nirukk52 0
  • removed the .idea file and the unused tags.

    removed the .idea file and the unused tags.

    I liked the project and hence, wanted to look into it. Because there was no issue I couldn't do much but had a look into the SnapTabLayout files and found some unused tags of and removed them, also, the .idea file was not added in the .gitignore file and added it because, that is actually information about the individual and should not be pushed to the project main repository.

    opened by thenishchalraj 0
  • removed the .idea file and the unused tags.

    removed the .idea file and the unused tags.

    I liked the project and hence, wanted to look into it. Because there was no issue I couldn't do much but had a look into the SnapTabLayout files and found some unused tags of and removed them, also, the .idea file was not added in the .gitignore file and added it because, that is actually information about the individual and should not be pushed to the project main repository.

    opened by thenishchalraj 0
  • [Enablement]

    [Enablement]

    As an engineer, I want to blah blah, so that I can blah blah.

    Description

    Helpful Links

    Type

    • [ ] Kotlin Conversion.
    • [ ] Library Version Update.
    • [ ] Feature Flag Removal.
    • [ ] Creating reusable code.

    Checklist

    • [ ] Requires QA testing
    Medium Priority 
    opened by nirukk52 0
  • [Enablement]

    [Enablement]

    As an engineer, I want to blah blah, so that I can blah blah.

    Description

    Helpful Links

    Type

    • [ ] Kotlin Conversion
    • [ ] General refactoring.
    • [ ] Combining similar code.
    • [ ] Creating reusable code

    Checklist

    • [ ] Requires QA testing
    Medium Priority 
    opened by nirukk52 0
Owner
Niranjan Kurambhatti
Android and other things
Niranjan Kurambhatti
A simple keyframe-based animation framework for UIKit. Perfect for scrolling app intros.

Jazz Hands is a simple keyframe-based animation framework for UIKit. Animations can be controlled via gestures, scroll views, KVO, or ReactiveCocoa. J

IFTTT 6.4k Dec 30, 2022
Library containing common animations needed for transforming ViewPager scrolling for Android v13+.

ViewPagerTransforms Library containing common animations needed for transforming ViewPager scrolling on Android v13+. This library is a rewrite of the

Ian Thomas 2.5k Dec 31, 2022
Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.

Android ViewPagerIndicator Paging indicator widgets that are compatible with the ViewPager from the Android Support Library to improve discoverability

Jake Wharton 10.2k Jan 3, 2023
ViewPagers library for Android

freepager Ready-to-use view pagers for your project. Based on Swipes navigation demo repository Usage: Gradle: dependencies { compile 'pro.alexza

Alex Zaitsev 460 Nov 25, 2022
Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock.

Android ViewPagerIndicator Paging indicator widgets that are compatible with the ViewPager from the Android Support Library to improve discoverability

Jake Wharton 10.2k Jan 5, 2023
Android LiquidSwipe Library

Android LiquidSwipe Library

Chrisvin Jem 838 Dec 29, 2022
Android Concentric Onboarding library

Android Concentric Onboarding library

Chrisvin Jem 50 Sep 13, 2022
A Material Design ViewPager easy to use library

MaterialViewPager Material Design ViewPager easy to use library Sample And have a look on a sample Youtube Video : Youtube Link Download In your modul

Florent CHAMPIGNY 8.2k Dec 29, 2022
Pixplicity 915 Nov 8, 2022
Library for Sliding Tab With Color Icons!

Sliding Tab With Color Icons Sliding Tab With Color Icons! Kindly use the following links to use this library: In build.gradle (Project) allprojects {

Prabhakar Thota 35 Jan 22, 2022
A simple app that consumes The Ricky & Morty API to display the tv show characters, was trying to learn about pagination with the paging 3 library

Ricky&MortyAPIDemo A simple app that consumes The Rick and Morty API which is a REST and GraphQL API based on the television show Rick and Morty. I wa

Joel Kanyi 9 Jul 12, 2022
LiquidSwipe is a ViewPager library that can be used to make Awesome Onboarding designs.

LiquidSwipe LiquidSwipe is a ViewPager library that can be used to make Awesome Onboarding designs. Usage Set up the dependency Add the mavenCentral()

Farham Hosseini 4 Nov 5, 2021
Circular motion is a ViewPager library that can be used to make Awesome Onboarding designs.

CircularMotion Android Circular Motion Onboarding library Circular motion is a ViewPager library that can be used to make Awesome Onboarding designs.

Farham Hosseini 4 Nov 5, 2021
Three material Dots Indicators for view pagers in Android !

Material View Pager Dots Indicator This library makes it possible to represent View Pager Dots Indicator with 3 different awesome styles ! It supports

Tommy Buonomo 2.8k Jan 5, 2023
A pager for Android with parallax effect

ParallaxPagerTransformer A pager transformer for Android with parallax effect Installation in your build.gradle file dependencies { // ... com

Javier Gonzalez 654 Dec 29, 2022
A nicer-looking, more intuitive and highly customizable alternative for radio buttons and dropdowns for Android.

SwipeSelector Undergoing for some API changes for a 2.0 major version, see example usage in the sample module! What and why? Bored of dull looking rad

Iiro Krankka 1.1k Dec 9, 2022
Android auto scroll viewpager or viewpager in viewpager

Android Auto Scroll ViewPager ViewPager which can auto scrolling, cycling, decelerating. ViewPager which can be slided normal in parent ViewPager. Att

Trinea 1.7k Dec 10, 2022
An android ViewPager extension allowing infinite scrolling

NO LONGER MAINTAINED LoopingViewPager An android ViewPager extension allowing infinite scrolling. You can use it with "standart" PagerAdapter (inflati

Leszek Mzyk 992 Nov 10, 2022
Augment Android's ViewPager with wrap-around functionality.

Infinite View Pager Augment Android's ViewPager with wrap-around functionality. Original StackOverflow question: http://stackoverflow.com/questions/75

Antony Tran 692 Dec 14, 2022