diff --git a/api/current.txt b/api/current.txt index 0ccb12051..fdc796877 100644 --- a/api/current.txt +++ b/api/current.txt @@ -275,6 +275,8 @@ package android.support.design.widget { method public void removeTabAt(int); method public void setOnTabSelectedListener(android.support.design.widget.TabLayout.OnTabSelectedListener); method public void setScrollPosition(int, float, boolean); + method public void setSelectedTabIndicatorColor(int); + method public void setSelectedTabIndicatorHeight(int); method public void setTabGravity(int); method public void setTabMode(int); method public void setTabTextColors(android.content.res.ColorStateList); diff --git a/src/android/support/design/widget/TabLayout.java b/src/android/support/design/widget/TabLayout.java index 60b641049..999dc007f 100755 --- a/src/android/support/design/widget/TabLayout.java +++ b/src/android/support/design/widget/TabLayout.java @@ -278,6 +278,24 @@ public class TabLayout extends HorizontalScrollView { applyModeAndGravity(); } + /** + * Sets the tab indicator's color for the currently selected tab. + * + * @param color color to use for the indicator + */ + public void setSelectedTabIndicatorColor(@ColorInt int color) { + mTabStrip.setSelectedIndicatorColor(color); + } + + /** + * Sets the tab indicator's height for the currently selected tab. + * + * @param height height to use for the indicator in pixels + */ + public void setSelectedTabIndicatorHeight(int height) { + mTabStrip.setSelectedIndicatorHeight(height); + } + /** * Set the scroll position of the tabs. This is useful for when the tabs are being displayed as * part of a scrolling container such as {@link android.support.v4.view.ViewPager}.