BannerLayoutSimple

Introduction: 支持图片无限轮播的 BannerLayout,支持自定义小圆点位置以及显示位置等等,反正支持的挺多的,源码也有注释
More: Author   ReportBugs   
Tags:
banner-viewpager-无限轮播-图片轮播-自定义-
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

implementation 'com.github.7449.BannerLayout:banner:release.version'
implementation 'com.github.7449.BannerLayout:banner-page:release.version'
implementation 'com.github.7449.BannerLayout:banner-shadow:release.version'
implementation 'com.github.7449.BannerLayout:banner-transformer:release.version'

api

banner.resource(items,boolean)

banner.start()
banner.stop()
banner.release()

banner.delayTime(Long)
banner.touchMode(boolean)
banner.duration(Int)
banner.setTransformer(PageTransformer)

banner.getItem(position)
banner.itemCount
banner.checkViewPager

banner.setOnBannerImageLoader()

banner.addOnItemClickListener()
banner.removeOnBannerClickListener()

banner.addOnBannerResourceChangedListener()
banner.removeOnBannerResourceChangedListener()

banner.doOnPageScrolled()
banner.doOnPageSelected()
banner.doOnPageScrollStateChanged()

banner.addOnBannerChangeListener()
banner.removeOnBannerChangeListener()

ImageLoaderManager

class GlideImageLoader : OnBannerImageLoader<SimpleBannerItem> {
    override fun instantiateItem(
        container: ViewGroup,
        item: SimpleBannerItem,
    ): View {
        return ImageView(container.context).apply {
            Glide.with(container.context)
                .applyDefaultRequestOptions(RequestOptions().centerCrop())
                .load(item.bannerUrl)
                .into(this)
        }
    }
}
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools