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);
        }
示例#2
0
        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);
        }
示例#3
0
        // 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);
        }
示例#4
0
 public void OnViewCreated(WXSDKInstance instance, View view)
 {
     SetContentView(view);
 }
示例#5
0
 public void OnRenderSuccess(WXSDKInstance instance, int width, int height)
 {
 }
示例#6
0
 public void OnException(WXSDKInstance instance, string errCode, string msg)
 {
 }