Xamarincommunitytoolkit: [Bug] [CameraView] [Android] CameraView does not use the view space defined in Xamarin.Forms

Created on 13 Sep 2020  路  4Comments  路  Source: xamarin/XamarinCommunityToolkit

Description

When using CameraView in Xamarin.Forms the default option for HorizontalOptions and VerticalOptions are FillAndExpand, yet the CameraView on Android does not use the space given to it and scale the image as AspectFill as it is on iOS.
I tried e.g. to create a CameraView that uses the whole screen. While on iOS it fills the whole screen, on Android it's only a square.

Steps to Reproduce

  1. Create a "full screen" CameraView that spans the whole screen
    or:
  2. Use the sample app
  3. Change to photo

Expected Behavior

The CameraView does use the whole space while using AspectFill as Aspect.

Actual Behavior

The CameraView does not use the whole space.

Basic Information

Workaround

Reproduction imagery

Android (invalid):
Screenshot_20200913_175908_com companyname xamarincommunitytoolkitsample
iOS (valid):
IMG_0049

Reproduction Link

CameraView bug android

Most helpful comment

I face the same issue... also on a Samsung SM-G950, the preview with zoom 1 is still more zoomed in than the actual picture taken.

All 4 comments

@acuntex can you confirm if this still happens?

@pictos Yes, it's still happening.

It's also interesting that in the sample if you switch to Front Camera and then from Video to Photo, the camera image is suddenly zoomed in.

I face the same issue... also on a Samsung SM-G950, the preview with zoom 1 is still more zoomed in than the actual picture taken.

Do we think the zoom issue has the same cause? If not, can we open a separate issue for that?

Was this page helpful?
0 / 5 - 0 ratings