utopiadevelopers / StaggeredGridView

This is based on the StaggeredGridView surfaced in the compatability library. There is also a demo included on how to use this.
4 stars 1 forks source link

Scrolling up and down #1

Open jeckill opened 11 years ago

jeckill commented 11 years ago

When I scroll to the bottom and then back up - is not displayed correctly. How to fix it? image 2

utopiadevelopers commented 11 years ago

What Android version are you on.Also are you able to get the Demo app to work perfectly in the same environment?? Also while scrolling is your data source changing???

jeckill commented 11 years ago

Adnroid 2.3,4
demo: http://bit.ly/198crxp I use univeralimageloader .. but even if I unplug it ... the problem remains. Another said .. if you long press (gridView.setOnLongClickListener (); undetermined) on the element .. the second element is changed. Sorry for my bad English))

jeckill commented 11 years ago

all the problems begin after clicking on the item.

utopiadevelopers commented 11 years ago

Are you using gridView.setOnClickListener()?? Currently only the itemclicklistener is working. setOnLongClickListener will or may cause problems.

jeckill commented 11 years ago

no no I'm using:

gridView.setOnItemClickListener(new StaggeredGridView.OnItemClickListener() { @Override public void onItemClick(StaggeredGridView parent, View view, int position, long id) { if (products.get(position).title!="") {

          Intent intent = new Intent(getApplicationContext(), view.class);
          intent.putExtra("position", position);

           startActivity(intent);}
  }
 });

I do not use setOnLongClickListener .. just noticed that when you long press changes the order of elements.

jeckill commented 11 years ago

Just checked .. onItemClick is replaced elements.

utopiadevelopers commented 11 years ago

Do you get the same behavior in the demo. I'll check it out anyway.

jeckill commented 11 years ago

in demo_app everything works well. Found the reason. My mistake in the adapter. Everything is working great! Sorry! and Thank you!

utopiadevelopers commented 11 years ago

Thats a relief. :P

jeckill commented 11 years ago

With an adapter problem decided. But two more issues 1) 1 2)When hold the item while scrolling down - selecting an item is not lost

utopiadevelopers commented 11 years ago

Ya selecting an Item needs to be looked into. For the first issue is that how items are laid out?? How to reproduce it.

jeckill commented 11 years ago

a 21 element, fully scroll down, then come back up. (each such changes scrolling "blank")

utopiadevelopers commented 11 years ago

Check the latest commit.Issue 2 should be fixed and or better.

jeckill commented 11 years ago

If 2 columns then everything is fine .. but if the problem 3 are reserved. I looked at this problem and all Staggeredgridview with onclickitem

utopiadevelopers commented 11 years ago

Ya all of them are based on code release by google so it does not surprise me. I have reproduced it but am not able to reproduce it reliably enough to debug.