twoway-view icon indicating copy to clipboard operation
twoway-view copied to clipboard

[layouts] Fixed scrolling on repaint partially drawn items

Open 0legg opened this issue 10 years ago • 18 comments

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 https://github.com/lucasr/twoway-view/issues/159 and probably fix issues https://github.com/lucasr/twoway-view/issues/140 and https://github.com/lucasr/twoway-view/issues/156

0legg avatar Nov 14 '14 22:11 0legg

do not fix to me. try to StaggeredGridLayoutManager

leeyc09 avatar Nov 19 '14 07:11 leeyc09

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

Denvar avatar Nov 24 '14 10:11 Denvar

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

lucasr avatar Nov 24 '14 11:11 lucasr

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

0legg avatar Nov 24 '14 20:11 0legg

@0legg ASAP.

leeyc09 avatar Nov 25 '14 06:11 leeyc09

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

lucasr avatar Nov 25 '14 13:11 lucasr

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

markmooibroek avatar Feb 11 '15 13:02 markmooibroek

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

hijamoya avatar Feb 24 '15 11:02 hijamoya

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

(and yes, you probably should merge it)

drommk avatar Feb 27 '15 15:02 drommk

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.

T-Spoon avatar Feb 27 '15 15:02 T-Spoon

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

Sserra90 avatar Feb 28 '15 12:02 Sserra90

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

lidemin avatar May 11 '15 04:05 lidemin

This fix works for me.

WilliTheWing avatar Aug 20 '15 14:08 WilliTheWing

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

KentHawkings avatar Oct 08 '15 16:10 KentHawkings

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?

leohgz avatar Mar 28 '16 21:03 leohgz

@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.

0legg avatar Mar 28 '16 21:03 0legg

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

leohgz avatar Mar 28 '16 21:03 leohgz

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

saikiran1220 avatar Jul 09 '16 20:07 saikiran1220