0

Hello

Thanks for checking my topic out! I will not go into depth why I have created this component, but safe to say for my specific application it was needed :)

The component is quite large so i used pastebin for this occation: http://pastebin.com/6jcmySr3

The problem

The issue here is not what you perhaps expected. The component works just great as a external GridView component to be used in a external ScrollView compared to the original one that android offers. Scroll normally and it will update the adapter Items correctly to the location you expected them to have. The issue I am having, is that if you scroll too fast the new location of the item might end up to be wrong and I can not figure out why.

My guess thus far have been that the newItemLocation-variable updates too fast when you scroll and the location where the view should have been moved is wrong, or that the view-update logic through getView updates too slow. In which case, I don't really have a solution for any of them. Could someone point me into the right direction?

Thanks!

*Edit: I am also using a ViewHolder pattern in my Adapter, so it's not because of that :)

Hiam
  • 303
  • 1
  • 4
  • 12

1 Answers1

0

I got the similar issue like you, the grid view will become empty or other strange cases(like display only one side without the other side when using etsy-like StaggeredGrideView), so I find a possible solution that can highly reduce the chance occurring this problem, you can try to set the min height of your TextView like android:minLines="n" or android:singleLine="true" in your GridView items(if you). That means the problem may be occurred when rendering the height of the TextView. Just try it~ =) You can refer this post as well ==> Android: Gridview going blank while scrolling fast

Community
  • 1
  • 1
Charlie MAI
  • 93
  • 11