0

I want to know the item visibility percentage inside recycler view adapter. Is there any event when item is attached to the recyclerView? Or how can I highlight the middle item (which is visible) in vertical recyclerView.

Actually I want to change the background colour of cardView if its visibility turns 100%.

Thanks

user1590595
  • 795
  • 2
  • 13
  • 37

1 Answers1

0

You can find visible item from the command

int findFirstVisibleItemPosition();
int findFirstCompletelyVisibleItemPosition();
int findLastVisibleItemPosition();
int findLastCompletelyVisibleItemPosition();
dhruv gangani
  • 163
  • 1
  • 12