Example #1
0
        public async void ScanImage()
        {
            // THIS ISN'T WORKING AS OF NOW.
            var beachImage = new Xamarin.Forms.Image {
                Aspect = Xamarin.Forms.Aspect.AspectFit
            };

            beachImage.Source = Xamarin.Forms.ImageSource.FromFile("QR_Code_Test.jpg");

            //var logo = Resources.GetDrawable(Resource.Drawable.QR_Code_Test);

            string uriString = "file:///android_asset/QR_Code_Test.jpg";
            Bitmap bMap      = BitmapFactory.DecodeFile(uriString);

            ReadBarcode();

            //Tell our scanner to activiytuse the default overlay
            scanner.UseCustomOverlay = false;

            //We can customize the top and bottom text of the default overlay
            scanner.TopText    = "Hold the camera up to the barcode\nAbout 6 inches away";
            scanner.BottomText = "Wait for the barcode to automatically scan!";

            //Start scanning
            var result = await scanner.Scan();

            HandleScanResult(result);
        }
Example #2
0
        public override IView ConvertToView(FigmaNode currentNode, ViewNode parent, ViewRenderService rendererService)
        {
            var imageView      = new Xamarin.Forms.Image();
            var figmaImageView = new Views.Forms.ImageView(imageView);

            imageView.Configure((RectangleVector)currentNode);
            return(figmaImageView);
        }
 public static bool UpdateProperty(this Xamarin.Forms.Image fView, string property, object value)
 {
     switch (property)
     {
     case nameof(Image.Bitmap):
         fView.Source = (value as Bitmap).ToImageSource();
         return(true);
     }
     return(fView.UpdateBaseProperty(property, value));
 }
 public static void UpdateProperties(this Xamarin.Forms.Image fView, Image view)
 {
     fView.UpdateBaseProperties(view);
     fView.Source = view.Bitmap.ToImageSource();
 }