Cardview: Android - ListView inside Carousel Scrolling issue

Created on 22 Jan 2020  路  24Comments  路  Source: AndreiMisiukevich/CardView

Hi @AndreiMisiukevich, please take a look at the gif, when I pull down to refresh, the listview will be shaking like that. Can you help checking for me?

untitled

android bug resolved

Most helpful comment

I just confirmed I have the same issue on Android. Even using OppositePanDirectionDisablingThreshold as 1 or 10. I also tried setting MoveThresholdDistance to 20.

As a workaround I just disabled panning in the carouselview. It is acceptable in my project.

All 24 comments

Hi, try MoveThresholdDistance = 20 or 10

@AndreiMisiukevich issue is still happened

@AndreiMisiukevich issue is still happened

okay, with 50 too ?

Try OppositePanDirectionDisablingThreshold = 1

Enable that property makes my listview scroll is hard and too laggy

I try the new version, and the issue is happening in iOS as well

Try OppositePanDirectionDisablingThreshold = 1

try tot set 5 or 10

Enable that property makes my listview scroll is hard and too laggy

As I told you, enable that property make my listview scroll is hanging and too laggy

Weird. This property just disallow horizontal scrolling, if the gesture is vertical

Are you experienced your initial issue on iOS? or android only?

https://drive.google.com/file/d/1ZWvZZ-eL47HddAwzm-TbPEdZPPtOjAly/view?usp=sharing
Please help check for Android, let's check the LiveScore.Features -> Scores -> Views -> ScoresView.xaml

I just confirmed I have the same issue on Android. Even using OppositePanDirectionDisablingThreshold as 1 or 10. I also tried setting MoveThresholdDistance to 20.

As a workaround I just disabled panning in the carouselview. It is acceptable in my project.

Hmm @akamud @huyjack178
Who knows how to resolve this stupid bug? Does anybody want to debug?

@AndreiMisiukevich , Hi, I had time to debug your code, I see the problem throws in these lines of code in CardsView.cs, in OnPanUpdated line 584, remove the code for Android, I don't know why you set OnTouchChanged for Android when Gesture is Completed

[EditorBrowsable(EditorBrowsableState.Never)]
        public void OnPanUpdated(PanUpdatedEventArgs e)
        {
            if (ItemsCount <= 0 || !IsPanInteractionEnabled)
            {
                return;
            }

            var diff = e.TotalX;
            var oppositeDirectionDiff = e.TotalY;
            if (!IsHorizontalOrientation)
            {
                var tempDiff = diff;
                diff = oppositeDirectionDiff;
                oppositeDirectionDiff = tempDiff;
            }
            switch (e.StatusType)
            {
                case GestureStatus.Started:
                    OnTouchStarted();
                    return;
                case GestureStatus.Running:
                    OnTouchChanged(diff, oppositeDirectionDiff);
                    return;
                case GestureStatus.Canceled:
                case GestureStatus.Completed:
                    // I remove these lines then the issue has gone
                    //if (Device.RuntimePlatform == Device.Android)
                    //{
                    //    OnTouchChanged(diff, oppositeDirectionDiff);
                    //}
                    OnTouchEnded();
                    return;
            }
        }

If I did that, it was needed.

Thanks, waiting for new version

Hi @AndreiMisiukevich, I have another issue, I used CarouselView as a ListView Header, when I pull down to refresh, it also affects the CarouselView. Please take a look at the gif below

untitled

Hi @AndreiMisiukevich, I have another issue, I used CarouselView as a ListView Header, when I pull down to refresh, it also affects the CarouselView. Please take a look at the gif below

untitled

Well, the previous issue is resolved, right?

OppositePanDirectionDisablingThreshold = 1 doesn't help, does it?

Yes, it doesn't

Can you get rid of headers? Just use datatemplateselector for this

What do you mean?

What do you mean?

You said that the carousel view is the header of ListView.
I propose to put carousel view as a separate cell (first cell)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stealthcold picture stealthcold  路  6Comments

troyvnit picture troyvnit  路  8Comments

toshitani23 picture toshitani23  路  6Comments

EldinHb picture EldinHb  路  8Comments

LeoJHarris picture LeoJHarris  路  3Comments