How can i change viewType in recycler view of center item while scolling

Viewed 21

I want to change the layout of the center item of the recycler view while scrolling. For example - If we have a horizontal recycler view of images, I want to show text along with the image for the center item visible on the screen, and the rest of the items will only contain the image. While scrolling also I want such behavior. So implementing CustomScrollListener for recycler view is not helping. Right now I am changing the viewType of the center item in the CustomScrollListener when it stops scrolling. It is working but I want such behavior while scrolling.

0 Answers
Related