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
Code Guide: How to create Snapchat-like image stickers and text stickers.

MotionViews-Android Code Guide : How to create Snapchat-like image stickers and text stickers After spending 2000+ hours and releasing 4+ successful a

Uptech 474 Dec 9, 2022
Highly customizable SlidingLayer as you have seen in Wunderlist

6Wunderkinder SlidingLayer for Android This repository hosts a library that provides an easy way to include an autonomous layer/view that slides from

Microsoft Archive 942 Nov 28, 2022
Highly customizable SlidingLayer as you have seen in Wunderlist

6Wunderkinder SlidingLayer for Android This repository hosts a library that provides an easy way to include an autonomous layer/view that slides from

Microsoft Archive 942 Nov 28, 2022
This is a library to help creating expanding views with animation in Android

About the Library inspiration This library is strongly inspired in this concept from Hila Peleg in dribble. See it below Working example For more deta

Diego Bezerra 944 Dec 27, 2022
Cube grid animation about the android.

CubeGrid Cube grid animation about the android. The android implementation about the 9-cube-grid Demo Usage Add dependency allprojects { repositories

alighters 218 Nov 23, 2022
Animation View to Highlight particular Views 🎯 for Android

TargetView Animation View to Highlight particular Views ?? for Android, it can be Used with Views that you see important (Like CountDownTimer), And al

Anas Altair 53 Aug 7, 2021
Implement a simple and funny Android animation —— the emoji rain in WeChat app.

中文版文档 Emoji Rain Hey, it's raining emoji! This is a really simple and funny animation for Android. You could find similar animations when sending "Hap

LoLo 615 Nov 21, 2022
A CirclerTimer with Animation and Timer

CircleTimer-Android A CirclerTimer with Animation and Timer Setup To use this library your minSdkVersion must be >= 21. In your build.gradle : allproj

jaeryo2357 17 Nov 7, 2022
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

UFreedom 1.8k Dec 27, 2022
Pop animation with circular dust effect for any view updation

Popview-Android Pop animation with circular dust effect for any view updation Getting Started In your build.gradle dependencies { compile 'rb.popv

R B Krishna 489 Dec 28, 2022
A download progressbar with cool animation

FreshDownloadView ##About FreshDownloadView is a java library for Android,It's a good way to show download progress with a cool animtion.some inspirat

null 747 Nov 23, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Enrique López Mañas 3.6k Dec 29, 2022
Android library providing bread crumbs to the support library fragments.

Hansel And Gretel Android library providing bread crumbs for compatibility fragments. Usage For a working implementation of this project see the sampl

Jake Wharton 163 Nov 25, 2022
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Dec 6, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022