preview stretches in camera2 apis

前端 未结 4 1441
别那么骄傲
别那么骄傲 2021-02-12 23:18

Following are the screenshots when using texture view in camera2 apis.In full screen the preview stretches,but it works when using lower resolution(second image). How to use thi

4条回答
  •  再見小時候
    2021-02-12 23:48

    I also faced similar situation, but this one line solved my problem

    view_finder.preferredImplementationMode = PreviewView.ImplementationMode.TEXTURE_VIEW
    

    in your xml:

    
    

    For camera implementation using cameraX you can refer https://github.com/android/camera-samples/tree/master/CameraXBasic

提交回复
热议问题