InfiniteHorizontalLayout icon indicating copy to clipboard operation
InfiniteHorizontalLayout copied to clipboard

Can't get infinite scroll to work with 4 number of items

Open tundsdev opened this issue 10 years ago • 2 comments

As the title clearly states i can't seem to get this to work with 4 items. I even changed the number of items to 4 in the example you provide but it still doesn't work even though these cells are fairly large. Is there anyway around this?

tundsdev avatar Dec 22 '15 23:12 tundsdev

There's a minimum number of cells after which this method doesn't work or at least I don't know how to get it work. At some item size and number of items cells start disappearing. Because you use constant item size and varying number of items you have to set minimum number of items yourself. Look for the line

#define MIN_NUMBER_OF_ITEMS_REQUIRED 6.

Try to set to 2 and fill your collection view with 2 items then run and scroll looking for disappearing cells. if you see them then set to 3.

pivl avatar Dec 24 '15 08:12 pivl

So just to follow on from this. Is there anyway of having preview cells on the left and right similar to this.

834a96b6-5481-11e5-9d25-8a385f2361db

pushonTunde avatar Dec 24 '15 10:12 pushonTunde