Skip to content
zhangpan edited this page Jun 26, 2022 · 7 revisions

What's new in version 3.x

  • Migrate to ViewPager2
  • Multiple item type supported
  • setOrientation supported
  • addPageTransformer and removeTransformer supported
  • setAdapter replaces setHolderCreator
  • getData replaces getList
  • registerOnPageChangeCallback replaces setOnPageChangeListener
  • setUserInputEnabled replaces disableTouchScroll
  • remove setPageTransformerStyle
  • remove some deprecate methods in v2.x
  • no longer support android.support library
  • SCALE slide mode and COLOR slide mode supported(V3.1.0)
  • refreshData() supported (V3.1.0)
  • setLifecycleRegistry(Lifecycle) supported (v3.1.4)
  • addData(List) Supported (3.2.0)
  • insertItem and removeItem Supported. (3.2.0)
  • addItemDecoration Supported. (3.2.0)

Preview

Download links for other versions: Download V3.5.0,Download V3.4.0

QRCode

1.PageStyle

Sample Click Here

MULTI_PAGE MULTI_PAGE_SCALE MULTI_PAGE_OVERLAP
MULTI_PAGE MULTI_PAGE MULTI_PAGE

More Page Styles

Many page styles can be implement using the setPageStyle() and setRevealWidth().

Style 1 Style 2 Style 3
MULTI_PAGE1 MULTI_PAGE2 MULTI_PAGE3

The Indicator library was split from BannerViewPager,the new repo is ViewPagerIndicator,Click the link to see more information about ViewPagerIndicator

(1)setIndicatorStyle and setIndicatorSlideMode

BannerViewPager supports three Indicator Styles and five Indicator Slide mode now.

Sample Click Here

Attrs CIRCLE DASH ROUND_RECT
NORMAL CIRCLE_NORMAL DASH_NORMAL ROUND_RECT_NORMAL
SMOOTH CIRCLE_SMOOTH DASH_SMOOTH ROUND_RECT_SMOOTH
WORM CIRCLE_WORM DASH_WORM ROUND_WORM
COLOR CIRCLE_COLOR DASH_COLOR ROUND_COLOR
SCALE CIRCLE_SCALE DASH_SCALE ROUND_SCALE

(2)Custom Indicator

It's also support to custom indicator style,just need extends BaseIndicatorView or implement the IIndicator and override methods, then you can draw Indicators for whatever you want.

Sample Click Here

Figure Indicator Drawable Indicator Indicator below of Banner
CIRCLE DASH NORMAL