Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getView() in adapter called with delay #112

Open
Bystysz opened this issue Jun 5, 2014 · 1 comment
Open

getView() in adapter called with delay #112

Bystysz opened this issue Jun 5, 2014 · 1 comment

Comments

@Bystysz
Copy link

Bystysz commented Jun 5, 2014

Hello
First I would like to thank you for preparing such a great library. Unfortunately I have found one bug. It is probably connected with a bug #107, but I am not sure, so I decided to create a new topic.
Under this URL: https://www.youtube.com/watch?v=UN-ASRymh4o there is a video, which I prepared to better explain you a bug.

Description:
In your sample on Github in StaggeredGridActivity.java class you create 30 tiles. When a user scrolls down to the last item, you start loading more tiles (another 30). I've found that after loading more tiles, when a user scrolls up to i.e. 25th tile and again scrolls down to a 30th tile, the next tiles will be visible after a delay. It seems like only when a group of new tiles (from those which have been loaded) must been in a visible area to show all of them. In a situation presented in video I had loaded more than 30 tiles.

What's more this bug occurs only when your library has to show new, loaded tiles and after calling notifyDataSetChanged() to an adapter.

I hope this bug is not difficult and you will fix it or maybe you could give me some advice to avoid this bug.

Łukasz

@mjsherman
Copy link

I am seeing the same issue in a production app. I'll try digging through to find a resolution, but I'm not terribly familiar with the internals of the library.

A reproducible example of the bug can be created by following these steps:

  1. Change SAMPLE_DATA_ITEM_COUNT in SampleData to 10 (from 30)
  2. In SampleAdapter, add: mRandom.setSeed(1); immediately after creating mRandom
  3. Run and open the sample to "Staggered Grid View"
  4. Choose "3 Columns"
  5. Scroll down until position 20 should be visible (middle column, below position 16).

Expected behavior: item 20 is visible once there is space below item 16
Actual Behavior: item 20 is not loaded until there is space below item 19, at which point both items 20 and 21 are immediately loaded/displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants