上面文章说的方法我用过后,屏幕变的很模糊,仅仅是因为第五步,所以不改变第五步的话,就改变第五步影响的参数吧,所以我把CameraManager中getFramingRectInPreview中的修改为:
Rect rect = new Rect(framingRect);
Point cameraResolution = configManager.getCameraResolution();
Point screenResolution = configManager.getScreenResolution();
rect.left = rect.left * cameraResolution.y / screenResolution.y;
rect.right = rect.right * cameraResolution.y / screenResolution.y;
rect.top = rect.top * cameraResolution.x / screenResolution.x;
rect.bottom = rect.bottom * cameraResolution.x / screenResolution.x;
framingRectInPreview = rect;
目前测试良好