using Android.Animation;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Util;
using Android.Views;
using Android.Webkit;
using Android.Widget;
using Android.Widget;
using Java.Interop;
using System;
namespace AndroidApplication1
{
[Activity(Label = "activity", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
public Context _context;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
_context = this;
SetContentView(Resource.Layout.Main2);
// Create your application here
WebView webview2 = FindViewById<WebView>(Resource.Id.webview1);
webview2.Settings.JavaScriptEnabled = true;
webview2.AddJavascriptInterface(new JavaScriptInterface2(_context), "insight");
//web
mono中的js调用本地方法
最新推荐文章于 2021-11-16 21:46:47 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)