alibaba / UltraViewPager

UltraViewPager is an extension for ViewPager to provide multiple features in a single ViewPager.
MIT License
5k stars 680 forks source link

demo里没用到数字风格的indicator(The demo doesn't use indicator with number style.) #83

Closed tupobi closed 6 years ago

tupobi commented 6 years ago
    if (parent == indicatorStyle) {
        switch (position) {
            case 0:
                ultraViewPager.disableIndicator();
                break;
            case 1:
                ultraViewPager.getIndicator().setFocusResId(0).setNormalResId(0);
                ultraViewPager.getIndicator().setFocusColor(Color.GREEN).setNormalColor(Color.WHITE)
                        .setRadius((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5, getResources().getDisplayMetrics()));
                break;
            case 2:
                ultraViewPager.getIndicator().setFocusResId(R.mipmap.tm_biz_lifemaster_indicator_selected)
                        .setNormalResId(R.mipmap.tm_biz_lifemaster_indicator_normal);
                break;
            case 3:
                break;
        }
    }

case 3: is empty

MikeAfc commented 6 years ago

Just do it yourself. haha