You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pluto.create(adapter, lifecycle = lifecycle)//pass the lifecycle to make the slider aware of lifecycle to avoid memory leak and handling the pause/destroy/resume
pluto.create(adapter,getLifecycle()); //pass the lifecycle to make the slider aware of lifecycle to avoid memory leak and handling the pause/destroy/resume
98
132
```
99
133
| Method | usage |
100
134
| ------ | ------ |
101
-
|``` create(PlutoAdapter adapter, long duration)```| it is the initialization method it take your adapter and the duration of waiting between each slide |
135
+
|``` create(PlutoAdapter adapter, long duration,Lifecycle lifecyle)```| it is the initialization method it take your adapter and the duration of waiting between each slide and lifecycle to make slider lifecylce-aware|
102
136
|``` startAutoCycle() ```| by default the value of autocycle is true, it determine to start autocycling or not |
103
137
|``` stopAutoCycle() ```| it stops the auto cycling of the view |
104
138
|``` moveNextPosition() ```| if you are the auto cylce is off you can manually move next with this method |
@@ -109,19 +143,47 @@ public class YourAdapter extends PlutoAdapter<YourModel, YourViewHolder> {
109
143
# Event Listeners
110
144
### for item click listener its the responsibility of the ```PlutoAdapter``` to handle it,
111
145
#### Example
146
+
### Kotlin
147
+
```kotlin
148
+
val adapter =SliderAdapter(getAvenger(), object:OnItemClickListener<Movie> {
0 commit comments