I'm trying to load a web page into a xamarin app my mainactivity.cs page has the following code
public class MainActivity : Activity
{
WebView webView;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
webView = FindViewById<WebView>(Resource.Id.webView);
webView.LoadUrl("https://urlofwebpage");
WebSettings webSettings = webView.Settings;
webSettings.JavaScriptEnabled = true;
}
}
and my main.axml contains this
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="25px"
android:minHeight="25px">
<android.webkit.WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView" />
</LinearLayout>
it seems to build but I only ever get a black screen in the emulator
Can anyone shed some light on why?