Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qdxxxx/BezierViewPager
BezierView
https://github.com/qdxxxx/BezierViewPager
Last synced: 2 months ago
JSON representation
BezierView
- Host: GitHub
- URL: https://github.com/qdxxxx/BezierViewPager
- Owner: qdxxxx
- Created: 2017-04-02T04:29:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-11T06:50:09.000Z (over 6 years ago)
- Last Synced: 2024-08-03T01:24:30.380Z (6 months ago)
- Language: Java
- Homepage:
- Size: 2.84 MB
- Stars: 862
- Watchers: 8
- Forks: 100
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - BezierViewPager - 触摸贝塞尔圆球式图片展示 (ViewPager)
README
# BezierViewPager
[![](https://www.jitpack.io/v/qdxxxx/BezierViewPager.svg)](https://www.jitpack.io/#qdxxxx/BezierViewPager)
[![](https://badge.juejin.im/entry/58e5b4a7ac502e4957aa46b6/likes.svg?style=flat)](https://juejin.im/user/57028e8f2e958a0059237a6b)
----
![image](https://github.com/qdxxxx/BezierViewPager/blob/master/appGif/效果图.gif)
喜欢~~这几位小姐姐~~的话,欢迎随手点个star。多谢各位老铁了。
### 集成方式- 注入依赖
Step 1. Add the JitPack repository to your build file
Step 2. Add the dependency
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
```
dependencies {
compile 'com.github.qdxxxx:BezierViewPager:v1.0.7'
}
```
#### Version
---
- v1.0.3 : 相对比1.0.2降低minSdkVersion至15,```cardAdapter.addImgUrlList(List imgUrlList); ``` 方法里图片集合List字段改为Obj,可接受drawable文件资源图片/Uri/...Glide可接受即可。
- v1.0.5 : 删除无用的资源文件.
- v1.0.7 : 需要创建自定义图片加载方式,继承```ImageLoadClient```,项目移除Glide,图片加载由你来提供.
### xml布局代码
```
```### Activity里面集成代码
```
ImageLoadFactory.getInstance().setImageClient(new GlideImageClient()); //v1.0.7 新增,需要继承GlideImageClient,实现图片加载方式
``````
CardPagerAdapter cardAdapter = new CardPagerAdapter(getApplicationContext());
cardAdapter.addImgUrlList(imgList); //放置图片url的list,v1.0.3版本imgList集合类型为List,只要Glide支持的都可以加载
BezierViewPager viewPager = (BezierViewPager) findViewById(R.id.view_page);
viewPager.setAdapter(cardAdapter);BezierRoundView bezRound = (BezierRoundView) findViewById(R.id.bezRound);
bezRound.attach2ViewPage(viewPager);
```
### 方法及属性介绍
- BezierRoundView
name | format |中文解释
---- |------ |----
color_bez | color |贝塞尔圆球颜色
color_touch | color |触摸反馈
color_stroke | color |圆框的颜色
time_animator | integer |动画时间
round_count | integer |圆框数量,即Adapter.getCount
radius | dimension |贝塞尔圆球半径,圆框半径为(radius-2)
attach2ViewPage|BezierViewPager|绑定指定的ViewPager(处理滑动时触摸事件)
并自动设置round_count---
- BezierViewPager[extends ViewPager]
name | format |中文解释
---- |------ |----
showTransformer| float |ViewPager滑动到当前显示页的放大比例---
- CardPagerAdapter[extends PagerAdapter]
name | format |中文解释
---- |------ |----
addImgUrlList | List |包含图片地址的list
setOnCardItemClickListener| OnCardItemClickListener |当前ViewPager点击事件
返回CurPosition
setMaxElevationFactor | integer |Adapter里CardView最大的Elevation---
### Article
---
博客详解文章
[http://blog.csdn.net/qian520ao/article/details/68952079](http://blog.csdn.net/qian520ao/article/details/68952079)