Image TapGestureRecognizer takes time to fire event

Hello,

I have one Image TapGestureRecognizer Event After click on image need to dispaly loader after event fire dismiss loader. ihave apply to many solution but not able to find any perfact solution

need loader instant after click on image.


<Image.GestureRecognizers>

</Image.GestureRecognizers>

private async void OnSettingButtonClicked(object sender, EventArgs e)
{
DependencyService.Get().Show();
try
{
await Navigation.PushAsync(new CustomerInfoTabbedPage());
DependencyService.Get().Hide();
}
}
catch (Exception ex)
{
DependencyService.Get().Hide();;
}
}

Thank you in advance Hope any one help me.

Answers

  • chetanrawatchetanrawat USMember ✭✭✭
    edited April 12

    Hi, @Krishna_Dash

    Try this
    private async void OnSettingButtonClicked(object sender, EventArgs e)
    {
    await Task.Delay(1000);
    DependencyService.Get().Show();
    try
    {
    await Navigation.PushAsync(new CustomerInfoTabbedPage());
    DependencyService.Get().Hide();
    }
    }
    catch (Exception ex)
    {
    DependencyService.Get().Hide();;
    }
    }

Sign In or Register to comment.