Search code examples
androidandroid-listviewrecycle

Is it possible to make ListView "draw more" than is on the screen? (Cache more.)


Imagine you have a full screen ListView, with cells roughly the size of the screen, and 100s of cells.

In fact, I notice ListView "keeps alive" about five of the cells...

(Let's say, roughly 1 or 2 on screen and 1 or 2 up and down offscreen.)

Quite simply, can you change this "setting" to say 20? Can you force ListView to be "more ready" when you scroll -- that is to say, to "recycle less"?

What's the situation? Or should I just write my own cell recycling handler? (As you sometimes do on iOS.)

Note that, essentially - say you made the "view" of the ListView perhaps 5x or 10x as high as the Actual Screen. (And then the "real" screen was in the middle of that.) In fact, that would do just what I describe. It would have more cells "ready" all the time. In fact, can yo do that? (Perhaps that's trivial, I don't know.) Or is ListView only trigger strictly by the "real, genuine" screen? Can you "trick" it somehow in to thinking the screen is 5x higher than it is?

Cheers


Solution

  • I dont think you can do that in android. That is because items will get recycled when they are off screen.