I am using HybridWebView in my app and want to show loading activity indicator while page is loading using the following code. However the LoadFinished event is never called. Not sure what am I missing here-
var layout = new StackLayout ();
var loadingLabel = new Label (){ Text = "Loading...." , HorizontalOptions=LayoutOptions.CenterAndExpand};
var activityIndicator = new ActivityIndicator (){IsRunning=true};
var loadingLayout = new StackLayout (){ Children = { activityIndicator, loadingLabel },HorizontalOptions=LayoutOptions.CenterAndExpand};
loadingLayout.IsVisible = true;
layout.Children.Add(loadingLayout);
var webView=new HybridWebView(){HorizontalOptions=LayoutOptions.FillAndExpand, VerticalOptions=LayoutOptions.FillAndExpand};
webView.SetBinding (WebView.SourceProperty, new Binding ("CurrentSource"));
webView.LoadFinished += (s, e) => {
activityIndicator.IsRunning=false;
loadingLayout.IsVisible = false;
};
layout.Children.Add (webView);
Content = layout;
Thanks