I'm adapting the QuickReturnListView from LarsWerkman to my application but it takes too long to scroll the list. My application shows rows with thumnails but all are the same size.
public void computeScrollY() {
mHeight = 0;
mItemCount = getAdapter().getCount();
mItemOffsetY.clear();
for (int i=0;i<mItemCount;++i)
{
View view = getAdapter().getView(i, null, this);
view.measure(
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
mItemOffsetY.add(i, mHeight);
mHeight += view.getMeasuredHeight();
}
scrollIsComputed = true;
}
One thing I've thought to make this compute faster is not to called for every item to the getView because all my rows has the same size, but if I use the same view.getMeasuredHeight() for all the items the effect of the QuickReturnListView gets faulty. Can someone help me to improve this calculation? Thanks