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
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