diff options
author | likaid <likaid@codeaurora.org> | 2015-03-02 17:26:57 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-03-23 23:14:00 -0700 |
commit | 0acc1f027637c4f0126883be68f97817d7306032 (patch) | |
tree | 227e9b0ce0536af707a80240064addc3dc96db9a /src/com/android/camera/ui/FilmStripView.java | |
parent | c640e17f2ada0300938bb0aaa5aa2d018aa6f3e9 (diff) | |
download | android_packages_apps_Snap-0acc1f027637c4f0126883be68f97817d7306032.tar.gz android_packages_apps_Snap-0acc1f027637c4f0126883be68f97817d7306032.tar.bz2 android_packages_apps_Snap-0acc1f027637c4f0126883be68f97817d7306032.zip |
SnapdragonCamera: fix camera preview broken when resume from gallery
The postion of preview view wasn't centered after rotated device with
camera in background.
Adjust the view position when camera draws preview layout each time.
Change-Id: I488c25cda23f101cf1f1a10c54ca3d537474e53c
CRs-Fixed: 795482
Diffstat (limited to 'src/com/android/camera/ui/FilmStripView.java')
-rw-r--r-- | src/com/android/camera/ui/FilmStripView.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java index 46267a941..3edb23d3c 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -1273,12 +1273,8 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { return; } - // If the layout changed, we need to adjust the current position so - // that if an item is centered before the change, it's still centered. - if (layoutChanged) { - mViewItem[mCurrentItem].setLeftPosition( - mCenterX - mViewItem[mCurrentItem].getView().getMeasuredWidth() / 2); - } + mViewItem[mCurrentItem].setLeftPosition( + mCenterX - mViewItem[mCurrentItem].getView().getMeasuredWidth() / 2); if (mController.isZoomStarted()) { return; |