Extended Android Tab Layout with animated indicators that have continuous feedback.
Latest commit 524ce77 Feb 16, 2017 @Andy671 committed on GitHub Update README.md


Dachshund Tab Layout

License: MIT



Boosted Android Tab Layout with custom animated indicators including "Dachshund" animation inspired by this.


Available Animated Indicators

Indicator Example Custom behavior
PointMoveIndicator setInterpolator(TimeInterpolator interpolator)
LineMoveIndicator setEdgeRadius(int edgeRadius)
LineFadeIndicator setEdgeRadius(int edgeRadius)


Step 1

Add the JitPack repository to your build file

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

Step 2

Add the dependency

    dependencies {
        compile 'com.github.Andy671:Dachshund-Tab-Layout:v0.2.0'


DachshundTabLayout is a subclass of TabLayout, so usage is pretty similar. The most of the original methods should work without any problems. See sample and source code for more info.

Add DachshundTabLayout to xml (after the Toolbar in the AppBarLayout), if you have TabLayout simply replace it:


Setup it with a ViewPager:

    DachshundTabLayout tabLayout = (DachshundTabLayout) findViewById(R.id.tab_layout);

If you want to change animated indicator (see Available Animated Indicators):

    //AvailableAnimatedIndicator - change it with available animated indicator

    AvailableAnimatedIndicator indicator = new AvailableAnimatedIndicator(tabLayout);

Creating custom AnimatedIndicator

If you want to create your own custom AnimatedIndicator - you can implement AnimatedIndicatorInterface and if you want to use animators - AnimatorUpdateListener (See JavaDoc of AnimatedIndicatorInterface for more info):

public class CustomIndicator implements AnimatedIndicatorInterface, ValueAnimator.AnimatorUpdateListener {

    private DachshundTabLayout dachshundTabLayout;

    public CustomIndicator(DachshundTabLayout dachshundTabLayout){
        this.dachshundTabLayout = dachshundTabLayout;

        //here set-up your Animators, Paints etc.

    public void onAnimationUpdate(ValueAnimator animator) {
        // when animator updates - invalidate your canvas, and draw what you want.

    public void setSelectedTabIndicatorColor(@ColorInt int color) {
        // customization of color

    public void setSelectedTabIndicatorHeight(int height) {
        // customization of height

    public void setIntValues(int startXLeft, int endXLeft,
                             int startXCenter, int endXCenter,
                             int startXRight, int endXRight){
        // X-positions of the target and current tabs

    public void setCurrentPlayTime(long currentPlayTime) {
        // current play time of the animation

    public void draw(Canvas canvas) {
        //Make your draw calls here

    public long getDuration() {
        return DEFAULT_DURATION;

XML Attributes

Attribute Type Default
ddIndicatorHeight dimension 6dp
ddIndicatorColor color Color.WHITE
ddAnimatedIndicator enum [dachshund, pointMove, lineMove, pointFade, lineFade] dachshund


  • Feel free to fork the repo, make pull requests or fix existing bug
  • Feel free to open issues if you find some bug or unexpected behaviour

Buy me a cup of coffee

Bitcoin Wallet: 15BuUMAW2jUdStPVkoNPt85P8tJnAy5vD4