lucasr / twoway-view

[DEPRECATED] RecyclerView made simple
5.23k stars 1.02k forks source link

UI mess while loading image with UniversalImageLoader #215

Open sharebooks opened 9 years ago

sharebooks commented 9 years ago

I am trying to load photos thumbnails into TwoWayView with UniversalImageLoader. The issue happens if I have many photos to load such as over 500. When I scroll the screen from top to bottom, then bottom to top. After couple times, all items are gone, or there is a white spacing at the top.

candyss9185 commented 9 years ago

Hi! I have been facing the same issue and I am trying to figure out why this happens. Have you been able to find a possible solution or the cause of the problem?

sharebooks commented 9 years ago

I did some investigate for a while and I may find the root cause but I did not find a solution as I did not go very deep into the source code.

What I find is that the issue is related to the async-loading. The extra spaces were added to mLayoutStart (or did not removed properly when the item is removed) in TwoWayLayoutManager.java. When the mLayouutStart is not calculated correctly, the result is there are more extra space right before the first item.

Hope this is helpful.

ishroid commented 9 years ago

SOLVED You may be right but i saw a answer on stackoverflow that work for me.

Try it by yourself

http://stackoverflow.com/a/29137921/1881611 On Mar 20, 2015 2:49 AM, "sharebooks" notifications@github.com wrote:

I did some investigate for a while and I may find the root cause but I did not find a solution as I did not go very deep into the source code.

What I find is that the issue is related to the async-loading. The extra spaces were added to mLayoutStart (or did not removed properly when the item is removed) in TwoWayLayoutManager.java. When the mLayouutStart is not calculated correctly, the result is there are more extra space right before the first item.

Hope this is helpful.

— Reply to this email directly or view it on GitHub https://github.com/lucasr/twoway-view/issues/215#issuecomment-83763528.

candyss9185 commented 9 years ago

Thanks! I'll take a look at it.