Android CustomTabPageIndicator多个样式

Android CustomTabPageIndicator多个样式,android,android-viewpager,android-styles,viewpagerindicator,Android,Android Viewpager,Android Styles,Viewpagerindicator,我使用的是viewPagerIndicator库,特别是TabPageIndicator。我有多个活动,在每个活动中,我需要为TabPageIndicator使用不同的样式。我对如何做到这一点有些茫然 我已尝试创建自定义类: public class CustomTabPageIndicator extends TabPageIndicator { public TopTabPageIndicator(Context context) { this(context

我使用的是viewPagerIndicator库,特别是TabPageIndicator。我有多个活动,在每个活动中,我需要为TabPageIndicator使用不同的样式。我对如何做到这一点有些茫然

我已尝试创建自定义类:

public class CustomTabPageIndicator extends TabPageIndicator {
    public TopTabPageIndicator(Context context)
    {
        this(context,null);
    }
    public CustomTabPageIndicator(Context context, AttributeSet attrs) {
        super(new ContextThemeWrapper(context,R.style.customTabStyle), attrs);
    } 
}
但由于某些原因,默认样式不会被覆盖。有人能帮助我们实现这一目标吗


谢谢你的帮助

我签出了这个链接:但是由于某种原因,默认布局和自定义布局合并在一起了。真的很绝望!!有人能给我指一下正确的方向吗?