diff options
author | likaid <likaid@codeaurora.org> | 2015-03-02 17:26:57 +0800 |
---|---|---|
committer | likaid <likaid@codeaurora.org> | 2015-03-02 17:26:57 +0800 |
commit | d95956afef133b3e47c8bc76901ee13b089d55ed (patch) | |
tree | 04dc1eb24fba9cd42202b0516e8956e08aa18a52 /src/com/android/camera/ui/FilmStripView.java | |
parent | 2d894ed368689085e89b6f0b79fb355575267e97 (diff) | |
download | android_packages_apps_Snap-d95956afef133b3e47c8bc76901ee13b089d55ed.tar.gz android_packages_apps_Snap-d95956afef133b3e47c8bc76901ee13b089d55ed.tar.bz2 android_packages_apps_Snap-d95956afef133b3e47c8bc76901ee13b089d55ed.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 3f1029ed1..d0053357c 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -1272,12 +1272,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; |