0

I need to convert WebView Navigated method from Xammarin.Forms to Xamarin.Android, What is equivalent to android. See code below

</StackLayout>
    <WebView x:Name="Browser" WidthRequest="1000" HeightRequest="1000" Navigated="webOnEndNavigating" />
</StackLayout>   

I tried below but doesn't seems to be working

public override void OnPageFinished(WebView view, string url)
{
    base.OnPageFinished(view, url);
    System.Diagnostics.Debug.WriteLine("Page url=>" + url);
    if (url.Contains(Paynetz.model.PaynetzConfig.GetResponseExpression()))
    {
        result = paynetz.ValidateResponse();
        view.GoBack();
    }
}
R15
  • 13,982
  • 14
  • 97
  • 173
  • By `convert WebView Navigated method from Xammarin.Forms to Xamarin.Android`, what do you mean? Call Android method? – Robbit May 16 '18 at 09:03
  • Yes exactly! I have above xaml code in Forms, I need to write that in Xam.android, `Navigated` event specially I need to convert – R15 May 16 '18 at 09:56
  • Why not use `Custom Renderers`? – Robbit May 16 '18 at 09:57
  • FYI, In have separate Xam.android project for that I need to write code, Not for Forms project. – R15 May 16 '18 at 09:59
  • I don't think that is possible, `OnPageFinished` is a callback method. – Robbit May 16 '18 at 10:17
  • Ok, But there should equivalent event (of `Navigated`) in android too for WebView. – R15 May 16 '18 at 10:20
  • 1
    I haven't used the `Navigated` event with WebView on Android. Maybe [this](https://stackoverflow.com/questions/10334067/get-the-webview-navigation-event) will help you. – Robbit May 16 '18 at 10:27

0 Answers0