question

EliseoGamba-8202 avatar image
0 Votes"
EliseoGamba-8202 asked JessieZhang-2116 commented

Camera Preview Size

Hi!

I follow this tutorial https://github.com/xamarin/xamarin-forms-samples/tree/master/CustomRenderers/View

In the picture in tutorial camara is in fullscreen but in my phone (Xiaomi Mi A2) just use 80% of the screen and i want picture cover all screen.

Anyone know how set fullscreen for camera?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @EliseoGamba-8202 , I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.

0 Votes 0 ·

1 Answer

JessieZhang-2116 avatar image
0 Votes"
JessieZhang-2116 answered

Hello,


Welcome to our Microsoft Q&A platform!

The camera sensor is 4:3. The screen is usually 16:9. The sample code choose to show the entire camera preview, so part of the screen is not filled. You need to stretch to fill the whole screen, however in that case the images captured include areas not shown in the preview.

If we really want to do this, we can try to change the android native code in android platform.

please pay attention to class CameraFragment.cs in sample CustomRenderers/View/.

For more details, you can refer to the following threads:
https://stackoverflow.com/questions/41985926/camera2-full-screen-preview-and-image-capture .

https://stackoverflow.com/questions/39044494/get-full-screen-preview-with-android-camera2


Best Regards,

Jessie Zhang


If the response is helpful, please click "Accept Answer" and upvote it.


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.