jamesmontemagno / Xamarin.Forms-PullToRefreshLayout

Pull To Refresh a ScrollView or ListView in Xamarin.Forms
218 stars 49 forks source link

Cannot scroll back up when scrollview has scrolled down to maximum #40

Closed Leojet86 closed 5 years ago

Leojet86 commented 6 years ago

Hi there,

Nice refresh feature you've made.

I noticed a small issue, but an annoying one nonetheless.

When you swipe up to make the scrollview go down, once the scrollview is at the bottom of the page, if you swipe down to go up it will always trigger the PullToRefresh feature. You won't be able scroll up anymore and the scrollview will get stuck.

Workaround: to scroll up swipe up first to prevent the PullToRefresh feature to activate, then scroll down to go up the scrollview.

sunayana1990 commented 6 years ago

Facing the same issue. cant scroll up once scrolled down.

jamesmontemagno commented 6 years ago

What platform and will need a sample.

Harikrishnav21 commented 6 years ago

@JoelLapointe86, I am facing same issue, the work around you mentioned is not straight forward to implement. Can you please provide the code workaround you did to avoid this or approach to avoid this behavior? @jamesmontemagno I am facing this is Android 8.0.0 What are additional implementation need to be done to support Android 6 too?

JunkyXL86 commented 6 years ago

Same problem here. It seems that it only works almost correctly if there is a top-level ScrollView on the page. I have a nested ScrollView inside the page and it never scrolls back up.

jamesmontemagno commented 6 years ago

I will need sample projects to test it out. Or add a sample to the one here so I can test it.

specialtrevor commented 6 years ago

I thought I had the same error, so please check you haven't done the same.

I had a WebView inside a StackLayout inside an AbsoluteLayout. I put the PullToRefreshLayout outside the AbsoluteLayout, and swiping up and down the WebView was causing the refresh to execute prematurely.

When I moved the PullToRefreshLayout to around the WebView directly, it all worked as intended.

MohammedSadiq123 commented 6 years ago

i still have this issue!

I have a nested ScrollView inside the Content page and it never scrolls back up.

sample:

`

    <pull:PullToRefreshLayout

        IsPullToRefreshEnabled="True"

        RefreshCommand="{Binding RefreshCommand}"

        IsRefreshing="{Binding IsRefreshing}"

        RefreshColor="Black">

        <Grid

            HeightRequest="{DynamicResource ScreenHeight}">

            <controls:CustomNavigavtionBarControl

                OpenSearchBoxCommand="{Binding OpenSearchBoxCommand, Mode=TwoWay }"

                OpenNotificationCommand="{Binding OpenNotficationPageCommand }"

                BackCommand="{Binding BackCommand}" />

            <ScrollView

                Margin="{DynamicResource RootContentThickness}">

                <StackLayout

                    Spacing="0"

                    Padding="{StaticResource RightLeftThicknessX}"

                    Orientation="Vertical">

                    <StackLayout`
specialtrevor commented 6 years ago

I had an issue previously that could be related (so this is a bit of a shot in the dark), but could you try putting the pull to refresh directly around the scroll view (inside of the grid layout)?

I had layouts within layouts and suffered from something similar and it fixed it for me.

I hope it helps.

jamesmontemagno commented 5 years ago

GridView and ListView are the only supported views at the root.

nelsonnil commented 4 years ago

can someone solve this problem for us