rdelrosario / ChatUIXForms

MIT License
58 stars 36 forks source link

Scrolling issues in Android 9.0 Pie #3

Open sandeepsipl opened 5 years ago

sandeepsipl commented 5 years ago

We have a strange issue with scrolling. When there are 100+ messages and we scroll the list on the Android phone having version 9.0 Pie, the scrolling is stuck and scroll in the wrong direction.

Like, if we try to scroll up speedy, then it came at the last message instead of scroll up and vice-versa.

Has anyone faced this issue earlier?

sandeepsipl commented 5 years ago

Any Updates?

Muthutc commented 5 years ago

Hi @sandeepsipl

Is it working in iOS.

danielbalderas commented 5 years ago

Hi @sandeepsipl Did you find a solution for this issue? I have the same problem

sandeepsipl commented 5 years ago

Hi @sandeepsipl

Is it working in iOS.

Yes, In iOS, Its working fine. I've tested till iOS 12.3

danielbalderas commented 5 years ago

Hi @sandeepsipl Is it working in iOS.

Yes, In iOS, Its working fine. I've tested till iOS 12.3

But in Android 9.0? I can't find a solution, I know is a problem with the rotationX property

jaykumarthaker commented 5 years ago

I have the same problem, any solution so far?

danielbalderas commented 5 years ago

I have the same problem, any solution so far?

The problems is still on android, so I implement a temporal solution. try to detect what type of scroll the user is doing and if is ScrollState.Fling invoke the scrollTo event on your listview again

jaykumarthaker commented 5 years ago

Thank you so much for the hint @danielbalderas 👍 So, on ScrollState.Fling we shall invoke scrollTo(), for instance below (scrolls to bottom):

ListViewMessages.ScrollTo (ViewModel.Messages [ViewModel.Messages.Count - 1], ScrollToPosition.End, true);

Now, how should we define ScrollTo? You mean, if ScrollState.Fling then scroll 10 items up or scroll 10 items down? Something like that?

Um, any chance you might be able to share code for this?

VasenevEA commented 5 years ago

I have this problem too. May be we can change something in ListViewRenderer?

gioggio79 commented 4 years ago

Same problem here. Any solution? Or maybe you can post your workaround?

gioggio79 commented 4 years ago

If you need help for get the ScrollState Event follow this blog, it help me a lot (http://aklazy.blogspot.com/2019/06/how-to-detect-listview-scroll-state.html)

acuntex commented 4 years ago

Reversing the CollectionView and the Items works great on iOS and some Android devices.

But on some Android devices like Samsung if you scroll up, the CollectionView scrolls down and if you scroll down, the CollectionView scrolls up. (Problem only occurs, if you scroll hard enough and let him scroll alone. dunno how to explain it better)

Is there any fix for this? Is FlowDirection="RightToLeft" and Rotation="180" still the best practice as of 2020?

acuntex commented 4 years ago

It's apparently an Android bug, workaround here: https://github.com/xamarin/Xamarin.Forms/issues/7166#issuecomment-585152206

angelru commented 3 years ago

@acuntex does the code passed to a CollectionView work fine too?

acuntex commented 3 years ago

@angelru Yes, the code in the linked comment works.

kofanov commented 3 years ago

Anyone have a solution for ListView? Not for CollectionView?