Giter Site home page Giter Site logo

recyclerbanner's Introduction

截图

使用

  • 只需要实现BannerCreator,自定义布局,在bannerView.setupWithBannerCreator(new ScaleCreator()), 最后onRefreshData()就行。

      class ScaleCreator implements BannerCreator<T> {
    
    		@Override public int getLayoutResId() {
      		//布局
      		return R.layout.item_scale;
    		}
    
    		@Override public void onBindData(View view, T data, int position) {
      		//绑定数据
      		ImageView imageView = view.findViewById(R.id.iv);
      	  imageView.setBackgroundColor(data);
    		}
      }
    
  • 属性表格

属性 方法 含义
null setupWithBannerCreator() 初始化布局
null onRefreshData() 刷新数据
null onStart() 开始
null onStop() 停止
null setOnBannerClickListener() 点击监听
null setOnBannerScrollChangeListener() 滚动监听
orientation setOrientation 方向
durationTime setDurationTime() 自动播放间隔时间
isShowIndicator setShowIndicator() 是否展示指示器
null setIndicatorDrawableRes() 设置指示器样式(select)
null setIndicatorColorRes() 设置指示器样式(select)
null setIndicatorStyle() 设置指示器位置样式
isAutoPlay setAutoPlay() 是否自动播放
isLoop setLoop() 是否无限循环
isScaleCover setScaleCover() 是否启用放大中间模式
scaleSize setScaleSize() 缩小比例(0到1)
isShowBothEnds setShowBothEnds() 是否展示上下两个
BothEndsSpace setSpaceBetween() 两端预留空间
  • 备注
  • 1、非无限模式下,即isLoop = false;初始和结束位置不会居中;
  • 2、isScaleCover = true时,默认isShowBothEnds = true;
  • 3、scaleSize是重正常大小缩小到设置的比例;

recyclerbanner's People

Contributors

linecyc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.