예제 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            this.RequestWindowFeature(WindowFeatures.NoTitle);

            // Create your application here
            var endpoint = this.Intent.GetStringExtra("signInUrl");

            var mainLayout = new LinearLayout(this);

            mainLayout.SetPadding(0, 0, 0, 0);

            var webClient = new AuthenticationWebViewClient();

            webView = new WebView(this);
            webView.VerticalScrollBarEnabled   = false;
            webView.HorizontalScrollBarEnabled = false;
            webView.SetWebViewClient(webClient);
            webView.Settings.JavaScriptEnabled = true;
            webView.LayoutParameters           = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
            webView.Settings.SavePassword      = false;
            webView.LoadUrl(endpoint);
            webView.AddJavascriptInterface(new AuthenticationJavaScriptInterface(this), "HTMLOUT");
            mainLayout.AddView(webView);
            this.SetContentView(mainLayout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent));

            if (thisActivity == null)
            {
                thisActivity = this;
            }
        }
예제 #2
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			this.RequestWindowFeature (WindowFeatures.NoTitle);

			// Create your application here
			var endpoint = this.Intent.GetStringExtra ("signInUrl");

			var mainLayout = new LinearLayout (this);
			mainLayout.SetPadding (0, 0, 0, 0);

			var webClient = new AuthenticationWebViewClient ();
			
			webView = new WebView(this);
			webView.VerticalScrollBarEnabled=false;
			webView.HorizontalScrollBarEnabled=false;
			webView.SetWebViewClient (webClient);
			webView.Settings.JavaScriptEnabled=true;
			webView.LayoutParameters= new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent,ViewGroup.LayoutParams.MatchParent);
			webView.Settings.SavePassword=false;
			webView.LoadUrl (endpoint);
			webView.AddJavascriptInterface(new AuthenticationJavaScriptInterface(this), "HTMLOUT");
			mainLayout.AddView(webView);
			this.SetContentView(mainLayout,new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent,ViewGroup.LayoutParams.MatchParent));

			if (thisActivity == null) {
				thisActivity = this;
			} 

		}