Example #1
0
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			RequestWindowFeature (WindowFeatures.NoTitle);
			SetContentView(Resource.Layout.view_list_image_url_layout);

			string filePath = "";
			if (this.Intent.Extras != null) {
				if (this.Intent.Extras.ContainsKey (constants.kFilePath)) {
					filePath =  this.Intent.Extras.GetString (constants.kFilePath);
				}
			}

			//var progressDialog = ProgressDialog.Show (this, "", "", true);
			//progressDialog.SetInverseBackgroundForced (true);
			//progressDialog.SetContentView(new ProgressBar(this));

			//progressDialog.SetCancelable (true);
			//progressDialog.SetCanceledOnTouchOutside (true);

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

			// Sets images for the slider icons and their size
			imageView.SliderSelectedIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.slider_blt_grn);
			imageView.SliderUnselectedIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.slider_blt_trans);
			imageView.SetSliderIconDimensions(30, 30);

			// Sets an image for the Magnify button (and its size) in the top left and enables the ZoomImage event 
			imageView.MagnifyIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.ic_close_large);
			imageView.SetMagnifyIconDimensions(100, 100);
			imageView.MagnifyEnabled = true;
			// I want to show pictures in the imageview that are online, giving the MultiImageView a list of URLs to download at SampleSize 2 (2x scaled down) 
			imageView.DownloadedImageSampleSize = 2;
			string[] arrPath = {filePath};

//			imageView.LoadImageList(new [] {
//				""
//			});

			imageView.LoadImageList(arrPath);

			// Adding eventhandlers for when an image is loaded so I can update the imageview to show its images, and an eventhandler for when the Magnify button is pressed
			imageView.ImagesLoaded += (sender, e) =>
			{   // Loads the first image in the list
				RunOnUiThread(imageView.LoadImage);
				//progressDialog.Dismiss();
			};

			imageView.ZoomImageEvent += (sender, e) => {
				// Fire whatever code you want to happen on a Magnify click
				//imageView.SetScaleType(ImageView.ScaleType.FitXy);
				Finish();
			};
		}
Example #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.ph, container, false);

            image = view.FindViewById <MultiImageView>(Resource.Id.imageView1);
            var     myActivity = (ItemContext)this.Activity;
            MyClass mm         = new MyClass();
            var     myli       = mm.getPhotos(SharedObjects.mainId);

            photocall(myli);
            return(view);
        }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

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

			product_id = Intent.GetIntExtra("product_id",0);
			//setup background worker for data loading
			worker = new BackgroundWorker ();
			worker.DoWork += worker_DoWork;
			worker.WorkerSupportsCancellation = true;
			worker.RunWorkerCompleted += worker_RunWorkerCompleted;
			worker.RunWorkerAsync ();

			progress = new ProgressDialog(this);
			progress.Indeterminate = true;
			progress.SetProgressStyle(ProgressDialogStyle.Spinner);
			progress.SetMessage("Memuatkan data..");
			progress.SetCancelable(false);
			progress.Show();


			productImage = FindViewById<MultiImageView>(Resource.Id.productImage);
			tv_price = FindViewById <TextView> (Resource.Id.tv_price);
			tv_prodTitle = FindViewById <TextView> (Resource.Id.tv_prodTitle);
			wv_prodDesc = FindViewById <WebView> (Resource.Id.wv_prodDesc);
//			btn_addToCart = FindViewById <Button> (Resource.Id.btn_addToCart);
			btn_sellerInfo = FindViewById <Button> (Resource.Id.btn_sellerInfo);

     		var toolbar = FindViewById<V7Toolbar>(Resource.Id.toolbar);
			SetSupportActionBar (toolbar);
			toolbar.SetBackgroundColor (Color.ParseColor ("#9C27B0"));

			SupportActionBar.SetDisplayHomeAsUpEnabled (true);
			SupportActionBar.SetDisplayShowHomeEnabled (true);


			//call addToCart method
//			btn_addToCart.Click += (sender, e) => {
//				addToCart();
//			};

			btn_sellerInfo.Click += btnSellerInfo_click;

		}	
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			View view = inflater.Inflate (Resource.Layout.MyShop_ProductDetails, container, false);

			//setup background worker for data loading
			worker = new BackgroundWorker ();
			worker.DoWork += worker_DoWork;
			worker.WorkerSupportsCancellation = true;
			worker.RunWorkerCompleted += worker_RunWorkerCompleted;
			worker.RunWorkerAsync ();

			progress = new ProgressDialog(Activity);
			progress.Indeterminate = true;
			progress.SetProgressStyle(ProgressDialogStyle.Spinner);
			progress.SetMessage("Memuatkan data..");
			progress.SetCancelable(false);
			progress.Show();


			productImage = view.FindViewById<MultiImageView>(Resource.Id.productImage);
			tv_price = view.FindViewById <TextView> (Resource.Id.tv_price);
			tv_prodTitle = view.FindViewById <TextView> (Resource.Id.tv_prodTitle);
			wv_prodDesc = view.FindViewById <WebView> (Resource.Id.wv_prodDesc);
			//			btn_addToCart = FindViewById <Button> (Resource.Id.btn_addToCart);
			btn_sellerInfo = view.FindViewById <Button> (Resource.Id.btn_sellerInfo);

//			var toolbar = FindViewById<V7Toolbar>(Resource.Id.toolbar);
//			SetSupportActionBar (toolbar);
//			SupportActionBar.SetDisplayHomeAsUpEnabled (true);


			//call addToCart method
			//			btn_addToCart.Click += (sender, e) => {
			//				addToCart();
			//			};

			btn_sellerInfo.Click += btnSellerInfo_click;

			return view;
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // 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
            imageView = FindViewById<MultiImageView>(Resource.Id.imageView1);
            
            // Sets images for the slider icons and their size
            imageView.SliderSelectedIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.slider_blt_grn);
            imageView.SliderUnselectedIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.slider_blt_trans);
            imageView.SetSliderIconDimensions(30, 30);

            // Sets an image for the Magnify button (and its size) in the top left and enables the ZoomImage event 
            imageView.MagnifyIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.Magnify);
            imageView.SetMagnifyIconDimensions(70, 70);
            imageView.MagnifyEnabled = true;

            // I want to show pictures in the imageview that are online, giving the MultiImageView a list of URLs to download at SampleSize 2 (2x scaled down) 
            imageView.DownloadedImageSampleSize = 2;
            imageView.LoadImageList(new [] { 
                "http://blog.xamarin.com/wp-content/uploads/2013/01/evolve-badge.png",
                "http://oi50.tinypic.com/dfzo0k.jpg",
                "http://oi49.tinypic.com/kd6fcp.jpg"
            });

            // Adding eventhandlers for when an image is loaded so I can update the imageview to show its images, and an eventhandler for when the Magnify button is pressed
            imageView.ImagesLoaded += (sender, e) =>
            {   // Loads the first image in the list
                RunOnUiThread(imageView.LoadImage);
            };
            imageView.ZoomImageEvent += (sender, e) => {
                // Fire whatever code you want to happen on a Magnify click
            };
        }
Example #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // 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
            imageView = FindViewById <MultiImageView>(Resource.Id.imageView1);

            // Sets images for the slider icons and their size
            imageView.SliderSelectedIcon   = BitmapFactory.DecodeResource(Resources, Resource.Drawable.slider_blt_grn);
            imageView.SliderUnselectedIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.slider_blt_trans);
            imageView.SetSliderIconDimensions(30, 30);

            // Sets an image for the Magnify button (and its size) in the top left and enables the ZoomImage event
            imageView.MagnifyIcon = BitmapFactory.DecodeResource(Resources, Resource.Drawable.Magnify);
            imageView.SetMagnifyIconDimensions(70, 70);
            imageView.MagnifyEnabled = true;

            // I want to show pictures in the imageview that are online, giving the MultiImageView a list of URLs to download at SampleSize 2 (2x scaled down)
            imageView.DownloadedImageSampleSize = 2;
            imageView.LoadImageList(new [] {
                "http://blog.xamarin.com/wp-content/uploads/2013/01/evolve-badge.png",
                "http://oi50.tinypic.com/dfzo0k.jpg",
                "http://oi49.tinypic.com/kd6fcp.jpg"
            });

            // Adding eventhandlers for when an image is loaded so I can update the imageview to show its images, and an eventhandler for when the Magnify button is pressed
            imageView.ImagesLoaded += (sender, e) =>
            {   // Loads the first image in the list
                RunOnUiThread(imageView.LoadImage);
            };
            imageView.ZoomImageEvent += (sender, e) => {
                // Fire whatever code you want to happen on a Magnify click
            };
        }