protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mWXSDKInstance = new WXSDKInstance(this); mWXSDKInstance.RegisterRenderListener(this); mWXSDKInstance.Render(WXFileUtils.LoadAsset("index.weex.js", this), -1, -1); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mWXSDKInstance = new WXSDKInstance(this); mWXSDKInstance.RegisterRenderListener(this); // mVideoView = (PLVideoView)FindViewById<PLVideoView>(Resource.Id.PLVideo); // mVideoView.SetVideoPath("rtmp://live.hkstv.hk.lxdns.com/live/hks"); //string template; //using (StreamReader sr = new StreamReader(Assets.Open("tech_list.js"))) //{ // template = sr.ReadToEnd(); //} mWXSDKInstance.Render(WXFileUtils.LoadAsset("index.weex.js", this), -1, -1); }
// public ViewController(IntPtr handle) : base(handle) // { // } public override void ViewDidLoad() { base.ViewDidLoad(); instance = new WXSDKInstance(); instance.Init(); instance.ViewController = this; instance.Frame = this.View.Frame; instance.OnCreate += new Action <UIView>((UIView obj) => { this.RemoveFromParentViewController(); this.View = obj; this.View.AddSubview(this.View); }); instance.OnFailed += new Action <Foundation.NSError>((Foundation.NSError er) => { }); string source = System.IO.File.ReadAllText(System.Environment.SpecialFolder.Resources + "/index.weex.js"); instance.RenderView(source, null, null); }
public void OnViewCreated(WXSDKInstance instance, View view) { SetContentView(view); }
public void OnRenderSuccess(WXSDKInstance instance, int width, int height) { }
public void OnException(WXSDKInstance instance, string errCode, string msg) { }