public override bool OnJsPrompt(WebView view, string url, string message, string defaultValue, JsPromptResult result) { AlertDialog.Builder dialog = new AlertDialog.Builder(_activity); AlertDialog alert = dialog.Create(); alert.SetTitle(""); alert.SetMessage(message); EditText et = new EditText(view.Context); et.Text = defaultValue; alert.SetView(et); alert.SetButton("Ok", (c, ev) => { result.Confirm(et.Text); }); alert.SetButton2("Cancel", (c, ev) => { result.Cancel(); }); alert.Show(); return(true); }
public override bool OnJsPrompt(WebView view, string url, string message, string defaultValue, JsPromptResult result) { //return base.OnJsPrompt(view, url, message, defaultValue, result); result.Confirm(onJSCall.Invoke(url, message, defaultValue)); return(true); }