Show Lottie Animation during a process

Jassim Al Rahma
1,391
Reputation points
Hi,
I am trying below code and need to show Lottie Animation white muy code is running but the problem is it just hangs and the Lottie animation will only be show once the whole code is completed.
Here is my code;
async void ButtonPayNow_Clicked(System.Object sender, System.EventArgs e)
{
ButtonPayNow.IsVisible = false;
ScrollViewPay.IsVisible = false;
LottiePay.PlayAnimation();
LottiePay.IsVisible = true;
HttpClient comes here....
}
Kindly help...
Thanks,
Jassim