diff options
author | Steve Kondik <steve@cyngn.com> | 2016-11-17 20:38:43 -0800 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2017-01-04 22:00:42 +0200 |
commit | 42f83ee5aa67143fe2b375e51a2f1785846526e7 (patch) | |
tree | 0c8686bab4175181e49f56af8932da31d7569b27 /src/com/android/camera/ui/CameraControls.java | |
parent | 7ad3257b19464871c53eb4f11e98123fba35d6a0 (diff) | |
download | android_packages_apps_Snap-42f83ee5aa67143fe2b375e51a2f1785846526e7.tar.gz android_packages_apps_Snap-42f83ee5aa67143fe2b375e51a2f1785846526e7.tar.bz2 android_packages_apps_Snap-42f83ee5aa67143fe2b375e51a2f1785846526e7.zip |
snap: Improve the histogram
* Make it work with the new UI
* Make it pretty
Change-Id: Ib920307639f997c82ed003e0712fb28e9912a8e8
Diffstat (limited to 'src/com/android/camera/ui/CameraControls.java')
-rw-r--r-- | src/com/android/camera/ui/CameraControls.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java index 9102db3c3..9d023bbe9 100644 --- a/src/com/android/camera/ui/CameraControls.java +++ b/src/com/android/camera/ui/CameraControls.java @@ -145,6 +145,10 @@ public class CameraControls extends RotatableLayout { } } + if (mHistogramView.getVisibility() != View.GONE) { + mHistogramView.setVisibility(enable ? View.VISIBLE : View.INVISIBLE); + } + ((ShutterButton) mShutter).enableTouch(enable); mVideoShutter.setClickable(enable); mTopBar.setEnabled(enable); @@ -290,8 +294,11 @@ public class CameraControls extends RotatableLayout { mAutoHdrNotice.layout(l, t + mTopMargin, r, t + mTopMargin + mAutoHdrNotice.getMeasuredHeight()); - mHistogramView.layout(l, b - mBottomMargin - mHistogramView.getMeasuredHeight(), - r, b - mBottomMargin); + int hw = getResources().getDimensionPixelSize(R.dimen.histogram_width); + int hh = getResources().getDimensionPixelSize(R.dimen.histogram_height); + + mHistogramView.layout(r - hw, b - mBottomMargin - hh - 4, + r, b - mBottomMargin - 4); View retake = findViewById(R.id.btn_retake); if (retake != null) { @@ -478,7 +485,7 @@ public class CameraControls extends RotatableLayout { if (v instanceof RotateImageView) { ((RotateImageView) v).setOrientation(orientation, animation); } else if (v instanceof HistogramView) { - ((HistogramView) v).setRotation(-orientation); + ((HistogramView) v).setOrientation(orientation); } } } |