On my Xamarin.Forms project, I would like to display a Lottie animation during API calls or during the loading of a we
I would like to display a Lottie animation during API calls
public async void loadData()
{
//Data load started
viewModel.IsBusy = true;
await methodOfLoadingData...;
//Data load finished
viewModel.IsBusy = false;
}
during the loading of a website in a WebView:
private void MyWebView_Navigating(object sender, WebNavigatingEventArgs e)
{
viewModel.IsBusy = true;
}
private void MyWebView_Navigated(object sender, WebNavigatedEventArgs e)
{
viewModel.IsBusy = false;
}
But the loading duration is sometimes very short
The loading duration is depending on the time you completely loading the data/webview. If you load the data/webview very fast, the loading duration should be short.