Comments (14)
Even though there is no imageview but only layout, this phenomenon is occured. I think this problem is related with Staggeredgridview library. But it is hard to pick what exactly problem is.
from staggeredgridview.
Thank you will take a look
from staggeredgridview.
If the size of the data collection up to 80 or more ,scroll to the bottom then back to the top,column will offset some distance
from staggeredgridview.
Hello there,
I'm experiencing a similar problem. Layouting ImageViews inside the StaggeredGridView (about 100) and scrolling up and down causes the columns (currently two) to shift against each other. This effect gets visible when scrolling back to the upside. One of both columns won't start at the top most point.
I will dive into this and see if a can find something.
Greetings.
from staggeredgridview.
@maurycyw any news on this possibly?
from staggeredgridview.
I have spottet the problem in my case (don't know if it is the same with you): Since StaggeredGridView aligns all views inside a column with their respective margin it is important to keep the height of all views inside this columns stay the same while scrolling. In my case I used ImageViews which have some loading problems. Sometimes the image views are not displayed when scrolling from the top to the bottom. Sometimes the same ImageView is displayed when scrolling back. This causes all the other views above this image view to get pushed up (because the only thing that stays consistent is the margin between the views, not their size).
To fix this behaviour, I would have to ensure my ImageViews load proper, or the containing views (I have some LinearLayout) that are placed inside the StaggeredGridView keep the same height independent of their content.
So, it seems in my case this behaviour is reasonable. Probably it could something similar with your problems?
Greetings David
from staggeredgridview.
Hi David. Thanks for your answer. That is a similar case with me too... Problem is my images have dynamic sizes which I don't know before lazily loading them. So I need a better solution. Trying to figure one out...
from staggeredgridview.
@BenMoment, did you find a solution? I am facing the same issue and am trying to figure out a way but no luck so far. If you did find something that works would love to hear what you had to do to get things to work! Thanks!
from staggeredgridview.
@jarvisv I ended up rewriting a staggered grid view that is based on a ListView with multiple cell views (ViewCount is larger), that actually recycles the views pretty well. This project is still too experimental...
from staggeredgridview.
@BenMoment, thanks for the reply. I might end up doing the same too.
from staggeredgridview.
I am facing same problem... If any one find solution, please update here......
from staggeredgridview.
@BenMoment @jarvisv If you guys are lazy loading an image view, try measuring the view before setting the image. I use Jake Wharton's AspectRatioImageView with the dominant measurement being the width of the view. https://gist.github.com/JakeWharton/2856179
from staggeredgridview.
@briangriffey
https://gist.github.com/JakeWharton/2856179
is that working??
bcz when i use this not affected
and still problem create plz give me solution for this
from staggeredgridview.
Many issues are caused by caching in onMeasure(). This one seems to be the same problem.
Have a look at #89
from staggeredgridview.
Related Issues (20)
- Staggered Grid View Height issue
- add scrollbar
- Having issue while using custom Typeface, it affects smooth scrolling of StaggeredGridView
- setOnItemLongClickListener not work's :/
- Header, Footer is not supported HOT 1
- notifyDataSetChanged not working HOT 2
- DPad Selection
- Error in StaggeredGridView.java
- Is there any way to display vertical scroll bar?
- ArrayIndexOutOfBoundsException
- SGV.onMeasure() does not recalculate mColumnTops/Bottoms/Lefts when SGV dimension changes HOT 2
- Set listSelector HOT 1
- auto set width and height StaggeredGridView Item
- No SetSelection(int index) method HOT 2
- Cannot show content below staggered gridview HOT 1
- scrollbar
- SwipeRefreshLayout HOT 3
- Missing support for RTL layout
- Is it possible to set a header view crossing columns?
- Error inflating class com.origamilabs.library.views.StaggeredGridView
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from staggeredgridview.