android - Can we set the number of items in ListView that it should keep in memory, such that the ListView won't recycle every time -
i have listview
, heavy items (non scrollable gridview
, , textview
). have implemented viewholder
pattern in adapter still scrolling not smooth. can specify in listview
, how many items should keep in memory. have 3 items in listview
on scrolling , have discontinuity when new item come view.
example: 1st child , portion of 2nd clild visible, user scroll, when hit 3rd item, there slight discontinuity , 3rd item appear. on scrolling up, same thing happens when 1st child enter screen again.
can somehow specify listview
should keep 3 items in memory , dont recycle them, in case of viewpager(using setoffscreenpagelimit). know there no built in support specify that, can extend listview somehow have such functionality.
to answer question is
no
do this, set or view
s visibilty
gone
, use postion
in getview()
parameter to know if first item or not. set required view
s particular position visible
, other view
s gone
does seem helpful you?
Comments
Post a Comment