Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CameraView overlapping other views in MAUI (.NET8) #214

Open
stepkillah opened this issue Dec 3, 2023 · 2 comments
Open

CameraView overlapping other views in MAUI (.NET8) #214

stepkillah opened this issue Dec 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@stepkillah
Copy link
Contributor

stepkillah commented Dec 3, 2023

Describe the bug
In MAUI version there are some issues with properly displaying CameraView.

To Reproduce
Steps to reproduce the behavior:

  1. Open MAUI Sample App
  2. Open MVVM Demo page
  3. See that CameraView is overlapping over controls

Expected behavior
CameraView should be displayed correctly in specified sizes, and Preview should fill available space, and crop what's out of the bounds. See Xamarin Forms screenshot

Screenshots
MAUI
Screenshot_1701623966
Xamarin Forms
Screenshot_1701624031

Smartphone (please complete the following information):

  • Device: Google Pixel
  • OS: Android
  • Version Maui v8.0.0 (may be on previous too, haven't tested)

Additional context
I was trying to find what causes it and created PR to use the new ResolutionSelector, but it didn't fix the issue.

If set _previewView.SetScaleType(PreviewView.ScaleType.FitCenter) in CreatePlatformView - it affects this behavior, but it is not a fix, because it starts to fit the preview instead of filling

Known workarounds

Wrap CameraView into Frame and set ClipToBounds = true , but other issues appear like black camera view after the first scan.

@stepkillah stepkillah added the bug Something isn't working label Dec 3, 2023
@Quaybe
Copy link

Quaybe commented Dec 14, 2023

Can confirm, the camera view does all sorts of craziness.

@stepkillah
Copy link
Contributor Author

stepkillah commented Dec 15, 2023

A partial workaround is to wrap CameraView into Frame and set ClipToBounds = true , but other issues appear like a black camera view after first scan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants