Open jeckill opened 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???
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))
all the problems begin after clicking on the item.
Are you using gridView.setOnClickListener()?? Currently only the itemclicklistener is working. setOnLongClickListener will or may cause problems.
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.
Just checked .. onItemClick is replaced elements.
Do you get the same behavior in the demo. I'll check it out anyway.
in demo_app everything works well. Found the reason. My mistake in the adapter. Everything is working great! Sorry! and Thank you!
Thats a relief. :P
With an adapter problem decided. But two more issues 1) 2)When hold the item while scrolling down - selecting an item is not lost
Ya selecting an Item needs to be looked into. For the first issue is that how items are laid out?? How to reproduce it.
a 21 element, fully scroll down, then come back up. (each such changes scrolling "blank")
Check the latest commit.Issue 2 should be fixed and or better.
If 2 columns then everything is fine .. but if the problem 3 are reserved. I looked at this problem and all Staggeredgridview with onclickitem
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.
When I scroll to the bottom and then back up - is not displayed correctly. How to fix it?