diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-25 14:47:58 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-25 14:47:58 -0700 |
commit | e3d899eaa76b143410ac3047d4fc3c0edeb2e13b (patch) | |
tree | aec23e8adddebf3097f41d5d38d6ab5ce8a4800c | |
parent | 1d5c28bd33a303dee406da2bf80529f2648a98c5 (diff) | |
parent | 8f4c85f6cc70934a4ecec31bad05fef8b5b67d42 (diff) | |
download | android_packages_apps_Snap-e3d899eaa76b143410ac3047d4fc3c0edeb2e13b.tar.gz android_packages_apps_Snap-e3d899eaa76b143410ac3047d4fc3c0edeb2e13b.tar.bz2 android_packages_apps_Snap-e3d899eaa76b143410ac3047d4fc3c0edeb2e13b.zip |
Merge "SnapdragonCamera:Fix abnormal menu after switch camcorder to camera" into camera.lnx.1.0-dev.1.0
-rw-r--r-- | src/com/android/camera/VideoUI.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index 41b9cfd89..00f3c705a 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -295,17 +295,19 @@ public class VideoUI implements PieRenderer.PieListener, Point size = new Point(); mActivity.getWindowManager().getDefaultDisplay().getSize(size); mScreenRatio = CameraUtil.determineRatio(size.x, size.y); - if (mScreenRatio == CameraUtil.RATIO_16_9) { - int l = size.x > size.y ? size.x : size.y; - int tm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_top_margin); - int bm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_bottom_margin); - mTopMargin = l / 4 * tm / (tm + bm); - mBottomMargin = l / 4 - mTopMargin; - } + calculateMargins(size); mCameraControls.setMargins(mTopMargin, mBottomMargin); ((ViewGroup)mRootView).removeView(mRecordingTimeRect); } + private void calculateMargins(Point size) { + int l = size.x > size.y ? size.x : size.y; + int tm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_top_margin); + int bm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_bottom_margin); + mTopMargin = l / 4 * tm / (tm + bm); + mBottomMargin = l / 4 - mTopMargin; + } + public void cameraOrientationPreviewResize(boolean orientation){ mPrevOrientationResize = mOrientationResize; mOrientationResize = orientation; |