Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Relex committed May 24, 2019
1 parent 22a06f9 commit 002f078
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ChangeLog
--------
##### 2.X
* [Releases](https://github.com/ongakuer/CircleIndicator/releases)

##### 1.2.2
* Fix bug ([#69](https://github.com/ongakuer/CircleIndicator/issues/69))
Expand Down
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gradle
###### AndroidX
```groovy
dependencies {
implementation 'me.relex:circleindicator:2.1.0'
implementation 'me.relex:circleindicator:2.1.1'
}
```

Expand Down Expand Up @@ -71,6 +71,28 @@ indicator.attachToRecyclerView(recyclerView, pagerSnapHelper);
adapter.registerAdapterDataObserver(indicator.getAdapterDataObserver());
```


###### ViewPager2

```xml
<me.relex.circleindicator.CircleIndicator3
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="48dp"/>
```
```java

ViewPager2 viewpager = view.findViewById(R.id.viewpager);
viewpager.setAdapter(mAdapter);

CircleIndicator3 indicator = view.findViewById(R.id.indicator);
indicator.setViewPager(viewpager);

// optional
adapter.registerAdapterDataObserver(indicator.getAdapterDataObserver());
```


##### Properties:

* `app:ci_width`
Expand All @@ -82,6 +104,3 @@ adapter.registerAdapterDataObserver(indicator.getAdapterDataObserver());
* `app:ci_animator_reverse`
* `app:ci_orientation` (default:horizontal)
* `app:ci_gravity` (default:center)



0 comments on commit 002f078

Please sign in to comment.