package android.support.design.widget;

import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;

public final class TabLayoutUtils {
    @Nullable
    public static Drawable getBackground(@NonNull final TabLayout.Tab tab) {
        return tab.mView.getBackground();
    }

    @NonNull
    public static TabLayout.Tab setBackground(@NonNull final TabLayout.Tab tab, @Nullable final Drawable background) {
        ViewCompat.setBackground(tab.mView, background);
        return tab;
    }

    @NonNull
    public static TabLayout.Tab setVisibility(@NonNull final TabLayout.Tab tab, final int visibility) {
        tab.mView.setVisibility(visibility);
        return tab;
    }
}

@@ -72,24 +72,68 @@
 e.Drawable;%0A
+import android.support.annotation.ColorInt;%0A
 import andro
@@ -203,24 +203,84 @@
 n.Nullable;%0A
+import android.support.v4.graphics.drawable.DrawableCompat;%0A
 import andro
@@ -695,32 +695,404 @@
 urn tab;%0A    %7D%0A%0A
+    @NonNull%0A    public static TabLayout.Tab setBackgroundTint(@NonNull final TabLayout.Tab tab, @ColorInt final int tint) %7B%0A        Drawable bkg = tab.mView.getBackground();%0A        if (bkg != null) %7B%0A            bkg = DrawableCompat.wrap(bkg).mutate();%0A            DrawableCompat.setTint(bkg, tint);%0A        %7D%0A        setBackground(tab, bkg);%0A        return tab;%0A    %7D%0A%0A
     @NonNull%0A   

add setBackgroundTint util method