Android Camera2 API stretching the preview
问题 I am working with the Google sample project, but I cannot seem to get the preview to work without stretching it. public void setAspectRatio(int width, int height) { if (width < 0 || height < 0) { throw new IllegalArgumentException("Size cannot be negative."); } mRatioWidth = width; mRatioHeight = height; requestLayout(); } I have tried physically changing the aspect ration on the AutoFitTextureView class, this makes it full screen, but causes it to stretch. Has anyone figured out a successful