Skip to content

Commit 11d0efa

Browse files
committed
Update docs
1 parent 411ef6d commit 11d0efa

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Download](https://jitpack.io/v/intik/overflow-pager-indicator.svg)](https://jitpack.io/#intik/overflow-pager-indicator)
44
[![](https://jitci.com/gh/intik/overflow-pager-indicator/svg)](https://jitci.com/gh/intik/overflow-pager-indicator)
5-
[![license](https://img.shields.io/badge/license-MIT%20license-blue.svg)](https://github.com/intik/overflow-pager-indicator/blob/master/LICENSE)
5+
[![license](https://img.shields.io/badge/license-MIT%20license-blue.svg)](LICENSE)
66

77
Simple widget for recycler view - displaying dots indicators of currently selected page -
88
with some fancy animation when dataset is large.
@@ -62,14 +62,14 @@ Some layout with RecyclerView and OverflowPagerIndicator
6262
android:layout_height="wrap_content"
6363
>
6464

65-
<android.support.v7.widget.RecyclerView
66-
android:id="@+id/recycler_view"
65+
<androidx.recyclerview.widget.RecyclerView
66+
android:id="@+id/recyclerView"
6767
android:layout_width="match_parent"
6868
android:layout_height="120dp"
6969
/>
7070

7171
<cz.intik.overflowindicator.OverflowPagerIndicator
72-
android:id="@+id/view_pager_indicator"
72+
android:id="@+id/viewOverflowPagerIndicator"
7373
android:layout_width="wrap_content"
7474
android:layout_height="wrap_content"
7575
android:layout_gravity="center_horizontal|bottom"
@@ -83,31 +83,31 @@ Some layout with RecyclerView and OverflowPagerIndicator
8383
### Code
8484

8585
Attach
86-
[OverflowPagerIndicator](https://github.com/intik/overflow-pager-indicator/blob/docs-update/library/src/main/java/cz/intik/overflowindicator/OverflowPagerIndicator.java)
86+
[OverflowPagerIndicator](overflow-library/src/main/java/cz/intik/overflowindicator/OverflowPagerIndicator.kt)
8787
(usually after LayoutManager and Adapter setup) to
88-
[RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html)
89-
\- for listening to dataset changes
88+
[RecyclerView](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView)
89+
\- for listening to dataset changes:
9090

91-
```java
92-
overflowPagerIndicator.attachToRecyclerView(recyclerView);
91+
```kotlin
92+
viewOverflowPagerIndicator.attachToRecyclerView(recyclerView)
9393
```
9494

9595
Attach
96-
[SimpleSnapHelper](https://github.com/intik/overflow-pager-indicator/blob/docs-update/library/src/main/java/cz/intik/overflowindicator/SimpleSnapHelper.java)
96+
[SimpleSnapHelper](overflow-library/src/main/java/cz/intik/overflowindicator/SimpleSnapHelper.kt)
9797
to recycler view which will change selected page in indicator view as items in recycler
98-
view are snapped
98+
view are snapped:
9999

100-
```java
101-
SimpleSnapHelper snapHelper = new SimpleSnapHelper(overflowPagerIndicator);
102-
snapHelper.attachToRecyclerView(recyclerView);
100+
```kotlin
101+
val snapHelper = SimpleSnapHelper(viewOverflowPagerIndicator)
102+
snapHelper.attachToRecyclerView(recyclerView)
103103
```
104104

105105
Or use any other implementation of
106-
[PagerSnapHelper](https://developer.android.com/reference/android/support/v7/widget/PagerSnapHelper.html "Android Developers - docs - PagerSnapHelper")
106+
[PagerSnapHelper](https://developer.android.com/reference/androidx/recyclerview/widget/PagerSnapHelper "Android Developers - docs - PagerSnapHelper")
107107
or even some custom logic which will call:
108108

109-
```java
110-
OverflowPagerIndicator#onPageSelected(int position)
109+
```kotlin
110+
viewOverflowPagerIndicator.onPageSelected(position)
111111
```
112112

113113
### Customization

0 commit comments

Comments
 (0)