protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // this.Window.AddFlags(WindowManagerFlags.Fullscreen); mXWalkInitializer = new XWalkInitializer(this, this); mXWalkInitializer.InitAsync(); SetContentView(Resource.Layout.XWalkView); xwv = (Org.Xwalk.Core.XWalkView)FindViewById(Resource.Id.xwalkview); hh = new AppPreferences(this); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); mXWalkInitializer = new XWalkInitializer(this, this); mXWalkInitializer.InitAsync(); SetContentView(Resource.Layout.Main); // xwv.SetWebChromeClient(new WebChromeClient()); // xwv.SetWebViewClient(new SampleWebViewClient(xwv)); xwv.SetResourceClient(new SampleXWalkWebViewClient(xwv)); xwv = (Org.Xwalk.Core.XWalkView)FindViewById(Resource.Id.xwalkview); }
public override bool ShouldOverrideUrlLoading(Org.Xwalk.Core.XWalkView view, string url) { String temp = url.ToString(); if (temp.Contains("android_asset")) { } if (url.Contains("android_asset")) { return(false); } else { view.Context.StartActivity( new Intent(Intent.ActionView, Android.Net.Uri.Parse(url))); return(true); } }
public SampleXWalkWebViewClient(XWalkView view) : base(view) { this.xWalkView = view; }