Skip to content

Commit

Permalink
0.1.0 readme
Browse files Browse the repository at this point in the history
  • Loading branch information
LinweiJ committed Mar 17, 2018
1 parent 42fef63 commit c0c28c8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ allprojects {

```
dependencies {
compile 'com.github.LinweiJ:ViewPagerIndicator:0.0.2'
compile 'com.github.LinweiJ:ViewPagerIndicator:0.1.0'
}
```

Expand Down Expand Up @@ -70,10 +70,12 @@ Properties:

​ BY_RADIUS:3倍radius ; BY_DISTANCE :定义固定距离 ;BY_LAYOUT :根据layout_width均分得到距离

- `app:vpi_animation`(默认为true:动画开启 ; false:关闭动画)

2 . java

```java
mViewPagerIndicator = (ViewPagerIndicator) findViewById(R.id.viewPagerIndicator);
mViewPagerIndicator = (ViewPagerIndicator) findViewById(R.id.viewPagerIndicator);

//viewpager是固定页数, 传入viewpager即可
mViewPagerIndicator.setViewPager(mViewpager);
Expand All @@ -82,6 +84,14 @@ Properties:
//需要传入实际展示个数num
mViewPagerIndicator.setViewPager(mViewpager,num);

//真无限循环BannerView,配合BannerView,增加以下setViewPager
//https://github.com/LinweiJ/BannerView
// 两种情况 更多细节请看demo/BannerViewActivity
// if mBannerView.setCircle(true);无限循环
mIndicatorDefault.setViewPager(mBannerView.getViewPager(),true);
// if mBannerView.setCircle(false);固定 不循环
mIndicatorDefault.setViewPager(mBannerView.getViewPager(),false);

```

3.更多
Expand Down
11 changes: 10 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Add the dependency in your module build.gradle :

```
dependencies {
compile 'com.github.LinweiJ:ViewPagerIndicator:0.0.2'
compile 'com.github.LinweiJ:ViewPagerIndicator:0.1.0'
}
```

Expand Down Expand Up @@ -64,6 +64,7 @@ Properties:
- `app:num`
- `app:indicatorType` (LINE; CIRCLE; CIRCLE_LINE; BEZIER ;SPRING)
- `app:distanceType` (BY_RADIUS ; BY_DISTANCE ; BY_LAYOUT )
- `app:vpi_animation`(default true)

2.find **ViewPagerIndicator** through code, work with ViewPager

Expand All @@ -76,6 +77,14 @@ Properties:
//if viewpager's carousel , ex: allNum=100000 realNum=6
//you must give num = realNum ,ViewPagerIndicator need it to work
mViewPagerIndicator.setViewPager(mViewpager,num);

//show ViewPagerIndicator in BannerView
//more detail see https://github.com/LinweiJ/BannerView
//see demo/BannerViewActivity
// if mBannerView.setCircle(true);
mIndicatorDefault.setViewPager(mBannerView.getViewPager(),true);
// if mBannerView.setCircle(false);
mIndicatorDefault.setViewPager(mBannerView.getViewPager(),false);
```

3.more usage
Expand Down

0 comments on commit c0c28c8

Please sign in to comment.