[Activity(Label = "WebViewOpen", MainLauncher = false)] public class WebViewOpen : Activity { protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); //var view = FindViewById<WebView>(Resource.Id.webView1); var webView = FindViewById<WebView>(Resource.Id.webView1); //WebView webView = FindViewById<WebView>(Resource.Id.webView1); webView.Settings.JavaScriptEnabled = true; webView.Settings.BuiltInZoomControls = true; webView.Settings.SetSupportZoom(true); webView.ScrollBarStyle = ScrollbarStyles.OutsideOverlay; webView.ScrollbarFadingEnabled = false; webView.SetWebViewClient(new WebViewClient()); using (var _client = new HttpClient()) //neu { //SetContentView(Resource.Layout.home); _client.BaseAddress = new Uri("https://a***/"); view.SetWebViewClient(new WebViewClient()); //String postData = "uname=101670&pwd=hallowelt2018"; _client.BaseAddress = new Uri("https://a***/"); using (var client = new HttpClient()) { var content2 = new FormUrlEncodedContent (new[] { new KeyValuePair<string, string>("uname", "***"), new KeyValuePair<string, string>("pwd", "***"), new KeyValuePair<string, string>("action", "login"), new KeyValuePair<string, string>("src", "app") }); client.BaseAddress = new Uri("https://a***/"); var response2 = client.PostAsync("/", content2).Result; string result2 = response2.Content.ReadAsStringAsync().Result; //webView.LoadData(result2, "text/html", "UTF8"); } } } }
var view = FindViewById<WebView>(Resource.Id.webView1);
WebView webView = FindViewById<WebView>(Resource.Id.webView1);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)