airbnb / epoxy

Epoxy is an Android library for building complex screens in a RecyclerView
https://goo.gl/eIK82p
Apache License 2.0
8.51k stars 728 forks source link

[Question]Carousel move to the next item programmatically #1259

Open nksaroj opened 2 years ago

nksaroj commented 2 years ago

I have a requirement to display the Carousel Items and have buttons outside the Carousel items to go to the previous item and the next item. Given carousel items are the elements of the recycler view I should move to the next and previous position with the following methods but it seems to be not working

recyclerView.scrollToPosition(positionIndex) //or recyclerView.getLayoutManager().scrollToPosition(positionIndex)

I am not sure if there are any other callbacks to set the position as if a user is scrolling to the next item. Any help is highly appreciated