Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Answering my own question in case anyone else stumbles upon this. Changing native platform implementation from Android.Views.View to AndroidX.CoordinatorLayout.Widget.CoordinatorLayout like follow...
Answer
#1: Initial revision
Answering my own question in case anyone else stumbles upon this. Changing native platform implementation from `Android.Views.View` to `AndroidX.CoordinatorLayout.Widget.CoordinatorLayout` like following fixed the issue of preview not showing. ```csharp protected override AndroidQRCodeReaderView CreatePlatformView() { var context = MauiContext?.Context ?? Platform.AppContext; _previewView = new PreviewView(context) { LayoutParameters = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent) }; var _relativeLayout = new RelativeLayout(context) { LayoutParameters = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent) }; _relativeLayout.AddView(_previewView); var platformview = new AndroidQRCodeReaderView(context); platformview.AddView(_relativeLayout); return platformview; } ``` Reference: [github/afriscic/BarcodeScanning.Native.Maui](https://github.com/afriscic/BarcodeScanning.Native.Maui/blob/master/BarcodeScanning.Native.Maui/Platform/Android/CameraManager.cs)