this must be somethng very simple I\'m overlooking, but I have the following problem (the post is rather lengthy, but I want to provide as much info as possible :) ).
I
Use the standard Lazy Loader to get the images but never update onpostexecute, which causes the images to update too fast and get the randomness you don't desire.
I even used the code:
if (result != null && !mFlinging && myPosition < 12)
{
imageView.setImageBitmap(result);
}
int the onpostexecute which would then update the images correctly for the first screen, but if you fling the images screen then come back too quickly to the first screen get the randomness again so I now use the :
mPhotoView.setOnScrollListener(new OnScrollListener() {
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
// TODO Auto-generated method stub
}
public void onScrollStateChanged(AbsListView view, int scrollState) {
// TODO Auto-generated method stub
if(scrollState != SCROLL_STATE_IDLE) {
mAdapter.setFlinging(true);
} else {
mAdapter.setFlinging(false);
}
int first = view.getFirstVisiblePosition();
int count = view.getChildCount();
if (scrollState == SCROLL_STATE_IDLE || (first + count > mAdapter.getCount()) ) {
mPhotoView.invalidateViews();
}
}
});
to update the view.