コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public SampleXWalkWebViewClient(XWalkView view) : base(view)
 {
     this.xWalkView = view;
 }