Giter Club home page Giter Club logo

viewpagergallery's Introduction

ViewPagerGallery

不懂看博客、不懂看博客、不懂看博客

[博客讲解地址](https://blog.csdn.net/lin857/article/details/84644569)

欢迎大家Star

[下载体验APK-Demo](https://raw.githubusercontent.com/lzjin/ViewPagerGallery/master/imgfile/app1.2.apk)

特点功能:

支持左右无限滑动轮播
支持3D效果的画廊轮播
支持平面铺满常见轮播
支持平面自定义间距轮播
支持网络缓存图片(使用的Glide)
支持自定义指示器图标(默认指示器个数与url一样)
支持自定义圆角
支持自动切换图片,间隔默认5秒

API方法介绍:

initBanner(urlList, true)//url数组,是否3D画廊效果
addPageMargin(10, 50)//page之间的间距,中间item距离边界的间距
addPoint(6)//添加指示器之间的间距
addPointBottom(7)//指示器底部间距
addStartTimer(5)//添加自动切换
addRoundCorners(12)//添加圆角
finishConfig()//最后加这句

Usage

Gradle:
implementation 'com.github.lzjin:ViewPagerGallery:1.2'  

历史版本底部

Xml:

 <com.lzj.gallery.library.views.BannerViewPager
        android:id="@+id/banner"
        android:layout_width="match_parent"
        android:layout_height="150dp">

Java:

          banner.initBanner(urlList, true)//开启3D画廊效果
                .addPageMargin(10, 50)//参数1page之间的间距,参数2中间item距离边界的间距
                .addPoint(6)//指示器点间距
                .addStartTimer(8)//自动轮播5秒间隔
                .addPointBottom(7)//底部间距
                .addRoundCorners(12)//圆角
                .finishConfig()//这句必须加
                .addBannerListener(new BannerViewPager.OnClickBannerListener() {
                    @Override
                    public void onBannerClick(int position) {
                        //点击item
                    }
                });

v1.2

优化更新
  • 修复部分手机兼容问题
  • demo增加Fragment与recyclerView使用示例

v1.1

 优化更新
  • 优化界面适配问题
  • 增加Demo演示代码

v1.0

 预览版
  • 不建议使用

效果一:3D画廊效果

效果二:平面自定义间距效果

效果三:平面铺满常见效果

viewpagergallery's People

Contributors

denghanhao avatar lzjin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.