I followed the guides on cameraX which all use PreviewView for displaying the camera output using
preview.setSurfaceProvider(PreviewView.createSurfaceProvider());
How do I set the preview to use a textureview instead of a PreviewView
I followed the guides on cameraX which all use PreviewView for displaying the camera output using
preview.setSurfaceProvider(PreviewView.createSurfaceProvider());
How do I set the preview to use a textureview instead of a PreviewView
Copyright © 2021 Jogjafile Inc.
You can specify which view to use in PreviewView between SurfaceView and TextureView. Before setting surfaceProvider, set the implementation mode
previewView.implementationMode = PreviewView.ImplementationMode.COMPATIBLEHere previewView is the XML id of PreviewView.
PreviewView.ImplementationMode.COMPATIBLEis for TextureView. After setting this, the PreviewView will use TextureView to show Camera.The implementation mode for SurfaceView is
PreviewView.ImplementationMode.PERFORMANCEThis is compatible with