Xamarin.forms open camera inside popup - xamarin

Is there any way we can open camera in a custom popup in xamarin.forms? Currently I am using Xam.Plugin.Media which will open camera in an entire screen. what I am trying to mimic is open the camera inside a circular frame to show inside Rg.Plugin.Popup . How can I achieve it? Does it require platform level implementation? Any help is appreciated

First, I find a feature-request - Cropping interface of Xam.Plugin.Media and the author refused it as it should be done in a different app since it is not available out of the box on all platforms.
You can have a try with Take Photo Overlay (iOS Only) function of this plugin to add a layer in iOS camera.
I also find a useful OverlaySample of Xamarin.forms which can add overlayer to camera in Xamarin.forms.
Refer: overlayview-in-xamarin-forms
how-capture-image-using-camera-circle

Related

Make current screen into BLUR on Xamarin.forms

I'm making app with using Xamarin.forms PCL project.
I just wanted to know if there is some way to make current screen into blur screen.
I will put something on it.
I'm using SkiaSharp 2d library for XF which works great and support blur image.
But it's for image file to make blur.
Should I take a screenshot for current screen and put it on the top and make it blur?
Any tip will be helpful.
Thanks.
For iOS for blur you may try https://www.nuget.org/packages/Xamarin.Forms.Essentials.Controls/
For Android and Win there seems to be no such a straightforward functionality but one can try creating some bitmaps and blurring them.
The Sharpnado.MaterialFrame supports blurred background:
https://github.com/roubachof/Sharpnado.MaterialFrame

Skia view element in xamarin.forms

I'm trying to draw new elements/images via the new skiasharp library for xamarin forms.
I got the samples working but they only change the full content page with the new canvas.
So my question would be how to implement a single view which can be placed in any place in another content page. Does anyone have experiences with skia?
How do I choose the canvas? Do I have to overwrite an existing Image or similar?
Thanks for you help.
Sure, and there is a view which you are looking for: SkiaView.
It inherited from Xamarin.Forms.View and contains some properties such as HeightRequest or Scale.
I suppose you are interested in these classes:
SkiaView
ISkiaViewController
iOS - SkiaViewRenderer
iOS - NativeSkiaView
Android - SkiaViewRenderer
Android - NativeSkiaView
EDIT:
Finally there is a NuGet package with Xamarin.Forms support: SkiaSharp.Views.Forms 1.54.1-beta1. Samples are available in SkiaSharp repository.

Workaround scrollview zoom for android #appcelerator

Hi I am building a magazine viewer and I need to zoom and drag the content pages. I am using scrollview but I guess the zoom works only for ios. Is there any workaround for this? I am using Titanium 5 sdk, and don't found modules that support it.
On Android you might be able to use http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ImageView-property-enableZoomControls

Is there a Slide Image Gallery for Xamarin Android?

I am looking for a image gallery to use on Xamarin Android for a app i am creating but cant cant find any Gallery that slides left or right, Cant even find any blogs post on creating it to
I found a this one for Android its Called Android Image Slider
https://github.com/daimajia/AndroidImageSlider
But I cant open it Xamarin Studio
Also I am using the free version of Xamarin Studio
Is there any way i can achieve this using Xamarin?
I have implemented a image slider in xamarin android using FragmentStatePager adapter. You need three things
1) Main Activity which implements Adapter (Point #2)
2) Implementation of FragmentStatePagerAdapter for items and instantiate the fragment class (Point#3).
3) You need to implement fragment and set the image on the view. This fragment is then instantiated from the FragmentStatePagerAdapter and displayed on the screen as you scroll.
All you have to do count the no.of images you have in library and then on the activity, you need to shift the images on the view pager at certain time interval.
//displaying image for 2 seconds
Thread.Sleep (2000);
//Updating the view pager with the next image.
this.RunOnUiThread (() => _pager.SetCurrentItem (imageValue, true));
SetCurrentItem method on viewpager will show the display of the fragment.
Full Example and explanation in detail is available on Code Project
http://www.codeproject.com/Tips/1038358/Xamarin-Android-Image-Auto-Slider-and-OOM-Issue-Ha
Source code can be downloaded from my GIT HUB.
https://github.com/sahilkhan99/learnings/tree/master/autoImageSlider
Cheers

How to animate an image in a Mac OSX application?

I want to set a basic animation for an image.ie when the application opens, an image to be shown in the window and after 1 second that image has to dissolve and show another. Can i do that using the transition filters in Xcode? If so, how? If not how can i implement that?
Thanks,
LS Developer

Resources