summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui
diff options
context:
space:
mode:
authorlikaid <likaid@codeaurora.org>2015-03-02 17:26:57 +0800
committerlikaid <likaid@codeaurora.org>2015-03-02 17:26:57 +0800
commitd95956afef133b3e47c8bc76901ee13b089d55ed (patch)
tree04dc1eb24fba9cd42202b0516e8956e08aa18a52 /src/com/android/camera/ui
parent2d894ed368689085e89b6f0b79fb355575267e97 (diff)
downloadandroid_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')
-rw-r--r--src/com/android/camera/ui/FilmStripView.java8
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;