mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-13 15:02:07 +02:00
add a comment to a wild part
This commit is contained in:
parent
c74cd14a59
commit
1b2aeffa04
@ -464,6 +464,7 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
|
||||
}
|
||||
final LayoutParams lp = mSurfaceView.getLayoutParams();
|
||||
|
||||
// make sure to occupy whole width in every case
|
||||
if (mScreenSize.x > mPreviewSize.height) {
|
||||
final float ratio = (float) mScreenSize.x / mPreviewSize.height;
|
||||
lp.width = (int) (mPreviewSize.height * ratio);
|
||||
|
Loading…
x
Reference in New Issue
Block a user