CSJ2K.Android.Test.MainActivity.OnCreate C# (CSharp) Méthode

OnCreate() protected méthode

protected OnCreate ( Bundle bundle ) : void
bundle Bundle
Résultat void
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Bitmap bitmap;
            using (var stream = new MemoryStream())
            {
                this.Assets.Open("file2.jp2").CopyTo(stream);
                stream.Seek(0, SeekOrigin.Begin);
                bitmap = J2kImage.FromStream(stream).As<Bitmap>();
            }

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            var imageView = FindViewById<ImageView>(Resource.Id.imageView1);

            imageView.SetImageBitmap(bitmap);
        }
MainActivity