コード例 #1
0
        public MainPage()
        {
            var hybrid = new HybridWebViewRenderer();
            InitializeComponent();
            SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new XHybrid.App());
        }
コード例 #2
0
            /// <summary>
            /// Initializes a new instance of the <see cref="NativeWebView"/> class.
            /// </summary>
            /// <param name="renderer">The renderer.</param>
            public NativeWebView(HybridWebViewRenderer renderer, bool enableAdditionalTouchDetector) : base(renderer.Context)
            {
                enableDetector = enableAdditionalTouchDetector;

                if (enableDetector)
                {
                    var listener = new MyGestureListener(renderer);
                    this.detector = new GestureDetector(this.Context, listener);
                }
            }
コード例 #3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var web = new HybridWebViewRenderer();

            var container = new SimpleContainer();

            container.Register<IJsonSerializer, JsonSerializer>();
            container.Register<IDevice>(AppleDevice.CurrentDevice);

            Resolver.SetResolver(container.GetResolver());

            global::Xamarin.Forms.Forms.Init();

            // Code for starting up the Xamarin Test Cloud Agent
            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            #endif

            LoadApplication(new App());

            return base.FinishedLaunching(app, options);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MyGestureListener"/> class.
 /// </summary>
 /// <param name="renderer">The renderer.</param>
 public MyGestureListener(HybridWebViewRenderer renderer)
 {
     this.webHybrid = new WeakReference <HybridWebViewRenderer>(renderer);
 }
コード例 #5
0
            /// <summary>
            /// Initializes a new instance of the <see cref="NativeWebView"/> class.
            /// </summary>
            /// <param name="renderer">The renderer.</param>
            public NativeWebView(HybridWebViewRenderer renderer) : base(renderer.Context)
            {
                var listener = new MyGestureListener(renderer);

                this.detector = new GestureDetector(this.Context, listener);
            }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xamarin"/> class.
 /// </summary>
 /// <param name="webHybrid">The web hybrid.</param>
 public Xamarin(HybridWebViewRenderer webHybrid)
 {
     this.webHybrid = new WeakReference <HybridWebViewRenderer>(webHybrid);
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Client"/> class.
 /// </summary>
 /// <param name="webHybrid">The web hybrid.</param>
 public Client(HybridWebViewRenderer webHybrid)
 {
     this.webHybrid = new WeakReference <HybridWebViewRenderer>(webHybrid);
 }
コード例 #8
0
 public CustomClient(HybridWebViewRenderer webHybrid) : base(webHybrid) {}
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xamarin"/> class.
 /// </summary>
 /// <param name="webHybrid">The web hybrid.</param>
 public Xamarin(HybridWebViewRenderer webHybrid)
 {
     this.webHybrid = webHybrid;
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Client"/> class.
 /// </summary>
 /// <param name="webHybrid">The web hybrid.</param>
 public Client(HybridWebViewRenderer webHybrid)
 {
     this.webHybrid = webHybrid;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChromeClient"/> class.
 /// </summary>
 /// <param name="webHybrid">The web hybrid.</param>
 internal ChromeClient(HybridWebViewRenderer webHybrid)
 {
     this.webHybrid = webHybrid;
 }