Android轮播控件
ViewPager无限轮播功能。可以自定义indicator,需自定义实现 Indicator 接口,内置了圆形的IndicatorView,支持三种动画切换。
无缝衔接MagicIndicator大神的Indicator,打造花样Indicator,集成使用请参考Sample。
- 支持一屏三页
- 支持魅族效果
- 支持自定义Indicator
- 支持自定义view
- 支持数据刷新
- 解决下拉刷新等滑动冲突问题,如嵌套SwipeRefreshLayout
- 解决多次重复回调onPageSelected问题
- 良好的代码封装,更多优化请参考代码实现。
项目地址
效果图
描述 | 图片 |
---|---|
基本使用的功能,请下载Sample体验 | ![]() |
Indicator效果图 | 1 | 2 |
---|---|---|
Indicator查看simple代码 | ![]() |
![]() |
![]() |
![]() |
![]() |
描述 | 普通样式 | 两边缩放 | 魅族样式 |
---|---|---|---|
一屏三页 | ![]() |
![]() |
![]() |
使用步骤
Step 1.依赖banner
Gradle
dependencies{
implementation 'com.waitou:banner:3.0.4' //最新版本
}
或者引用本地lib
compile project(':banner')
Step 2.xml
<com.to.aboomy.banner.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="250dp"/>
Step 3.自定义HolderCreator
//实现HolderCreator接口
public interface HolderCreator {
View createView(final Context context,final