Prevent grid view recycling for neighbouring items

142 views Asked by At

Using a GridView, is it possible to allow the item directly above and below all the visible items to remain in memory? (I have one column in my grid view)

I would like my adapter to prevent recycling for those items as long as they are direct neighbours to items that are currently visible.

1

There are 1 answers

0
Eyeball On BEST ANSWER

My problem was that my GridView had some padding on both left and right side. This made the neighbouring items invisible/recycled "too fast".

Removing the padding resolved my issue.