Filipe Tabosa
Filipe Tabosa

Reputation: 303

Xamarin Forms Webview

I am currently getting the following error whenever I try to open a page from my Angular application using Xamarin.forms.view

04-05 20:12:17.110 W/BindingManager( 3550): Cannot call determinedVisibility() - never saw a connection for the pid: 3550[INFO:CONSOLE(1)] "ERROR", source: http://my-url/main.61d2d58c98366844c6a5.bundle.js (1)

My HybridView is being created as follow:

      _WebView = new UIHybridWebview
        {
            IsLocalData = false,
            Uri = "http://my-url/#/user/create",             
            VerticalOptions = LayoutOptions.FillAndExpand,
            HorizontalOptions = LayoutOptions.FillAndExpand,

        };

Where UIHybridWebView is a View from Xamarin.Form.

How could I solve this problem? All solutions that I found was related to Android.Webkit, and not Xamarin.Form

Upvotes: 0

Views: 377

Answers (2)

Filipe Tabosa
Filipe Tabosa

Reputation: 303

So I managed to make it work. The problem was not on the WebView, but on the HybridWebView. What saved me was this post on the official Xamarin's forum. The solution was very simple. I just had to add the following line on the "OnElementChanged" function:

webView.LayoutParameters = new global::Android.Widget.AbsoluteLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent, 0, 0);

Upvotes: 1

Ufuk Zimmerman
Ufuk Zimmerman

Reputation: 520

You Add Permission ?

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Upvotes: 1

Related Questions