use setSelectedIndicatorColors
instead of a colorizer class
This commit is contained in:
parent
ed67cb0af2
commit
fbc5b0732b
@ -40,7 +40,7 @@ public class VanillaTabLayout extends SlidingTabLayout {
|
|||||||
|
|
||||||
public VanillaTabLayout(Context context, AttributeSet attrs, int defStyle) {
|
public VanillaTabLayout(Context context, AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
setCustomTabColorizer(new TabColorizer(context));
|
setSelectedIndicatorColors(context.getResources().getColor(ch.blinkenlights.android.vanilla.R.color.tabs_active_indicator));
|
||||||
setDistributeEvenly(true);
|
setDistributeEvenly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,16 +71,5 @@ public class VanillaTabLayout extends SlidingTabLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class TabColorizer implements SlidingTabLayout.TabColorizer {
|
|
||||||
private final int mTabIndicatorColor;
|
|
||||||
TabColorizer(Context context) {
|
|
||||||
mTabIndicatorColor = context.getResources().getColor(ch.blinkenlights.android.vanilla.R.color.tabs_active_indicator);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public final int getIndicatorColor(int position) {
|
|
||||||
return mTabIndicatorColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user