jamesmontemagno / Xamarin.Forms-PullToRefreshLayout

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

IsRefreshing=False not Working. #7

Closed Sivamuralidhar closed 8 years ago

Sivamuralidhar commented 8 years ago

Hi James ,

this control is really cool.thanks for posting it.

While using pull to refresh am getting an issue, after refreshing am trying to set IsRefreshing= false but unfortunately this option is not working and the spinner is displaying always.

Thanks, Sivamuralidhar.

dcasbonne commented 8 years ago

HI @Sivamuralidhar . No problem here, in my command I can set IsRefreshing=false and it disables the spinner. Can you provide a sample of your code ?

jamesmontemagno commented 8 years ago

Can't reproduce here.

abozanona commented 7 years ago

Hello @jamesmontemagno , I'm facing this problem too, here's a sample of my code

<controls:PullToRefreshLayout
          x:Name="ptrLatestNews"
          IsPullToRefreshEnabled="True"
          IsRefreshing="False"
          RefreshColor="Blue">
var command = new Command(async () => await getConnection());
            ptrLatestNews.RefreshCommand = command;
private async Task getConnection()
{
    ....
    Device.BeginInvokeOnMainThread(() =>
    {ptrLatestNews.IsRefreshing = false;
    });
    ....
}

I've also put PullToRefreshLayoutRenderer.Init(); in both MainActivity and AppDeligate classes