Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

[layouts] Fixed scrolling on repaint partially drawn items #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[layouts] Fixed scrolling on repaint partially drawn items #167

wants to merge 1 commit into from

Conversation

0legg
Copy link

@0legg 0legg commented Nov 14, 2014

Right now moveLayoutToPosition is called every time when we are not at very beginning of list/grid and not in process of restoring (!restoringLanes is true for most of cases). Method onLayoutChildren is called every time when child view asked to be relayouted (for example, ImageView assigning a picture), so if first visible item is visible partially, view forced to be scroll up/left to show it whole content.

This commit will fix issue #159 and probably fix issues #140 and #156

@leeyc09
Copy link

leeyc09 commented Nov 19, 2014

do not fix to me. try to StaggeredGridLayoutManager

@Denvar
Copy link

Denvar commented Nov 24, 2014

Any news on this? These are big issues with most of my Grid Layout implementations

@lucasr
Copy link
Owner

lucasr commented Nov 24, 2014

Thanks for the PR! Sorry for the delay, busy weeks and all. I'll review and merge today or tomorrow.

@0legg
Copy link
Author

0legg commented Nov 24, 2014

@leeyc09 Can you please provide code sample? I've tested StaggeredGridLayoutManager with my fix against adapter loading placeholders from Internet, and it performed well.

@leeyc09
Copy link

leeyc09 commented Nov 25, 2014

@0legg ASAP.

@lucasr
Copy link
Owner

lucasr commented Nov 25, 2014

@0legg Unfortunately, this PR breaks scrollToPosition() in grid layout managers. Needs further investigation.

@markmooibroek
Copy link

This bug is preventing me to use this great library in more projects. Any ETA on fixing it @lucasr?

@hijamoya
Copy link

Any update about this? I am facing the same problem :(

@drommk
Copy link

drommk commented Feb 27, 2015

I patched this and now it works fine, thanks @0legg

(and yes, you probably should merge it)

@T-Spoon
Copy link

T-Spoon commented Feb 27, 2015

If I recall - with this fix, if you try and set an ItemDecorator, scroll down, and then scroll up, everything breaks. Just as an FYI for those using it.

@Sserra90
Copy link

I'm having the same problem, any updates recently on this bug ?

@lidemin
Copy link

lidemin commented May 11, 2015

Same problem for SpannableGridLayoutManager and this fix does work for it. However this fix will import another crash issue... Any update guys? Thanks.

@WilliTheWing
Copy link

This fix works for me.

@KentHawkings
Copy link

This causes a crash to occur if you rotate the screen after scrolling down partially and then attempt to scroll up again.

@leohgz
Copy link

leohgz commented Mar 28, 2016

This fix works partialy. However. If i do scroll back... i get "NullPointerException" at private static int getLaneSpan(SpannableItemEntry entry, boolean isVertical, int position) {
return (isVertical ? entry.colSpan : entry.rowSpan);

Can you people help me with this?

@0legg
Copy link
Author

0legg commented Mar 28, 2016

@leohgz I don't think it worth to do — library looks pretty much abandoned, and I have no enough free time and will to maintain my own fork.

@leohgz
Copy link

leohgz commented Mar 28, 2016

Does this issue is also in your fork? wich is the main different? because i see u still keep some packages from this lib.

@saikiran1220
Copy link

Hi,This i am facing this issue , how to fix this

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

Successfully merging this pull request may close these issues.