diff options
author | Angus Kong <shkong@google.com> | 2013-09-30 15:54:46 -0700 |
---|---|---|
committer | Angus Kong <shkong@google.com> | 2013-09-30 15:54:46 -0700 |
commit | a5d6b243d3d742cf9dd2ffdac88d386abacd123a (patch) | |
tree | 8f01ffe6de3df4315de9778038ede759366fbdc2 /src | |
parent | c4aa7c0e3c9b6a15eca03ba7bdaaccf3ceb8c15d (diff) | |
download | android_packages_apps_Snap-a5d6b243d3d742cf9dd2ffdac88d386abacd123a.tar.gz android_packages_apps_Snap-a5d6b243d3d742cf9dd2ffdac88d386abacd123a.tar.bz2 android_packages_apps_Snap-a5d6b243d3d742cf9dd2ffdac88d386abacd123a.zip |
Don't adjust the position while scrolling.
bug:10802703
Change-Id: I493c36b87c99de97275add1243f5ac363a28787e
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/ui/FilmStripView.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java index f28637c9d..3f2e278fd 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -1705,10 +1705,14 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { if (reporter.isDataUpdated(dataId)) { updateViewItem(mCurrentItem); final ImageData data = mDataAdapter.getImageData(dataId); - int[] dim = calculateChildDimension( - data.getWidth(), data.getHeight(), - getMeasuredWidth(), getMeasuredHeight()); - mCenterX = curr.getLeftPosition() + dim[0] / 2; + if (!mIsUserScrolling && !mController.isScrolling()) { + // If there is no scrolling at all, adjust mCenterX to place + // the current item at the center. + int[] dim = calculateChildDimension( + data.getWidth(), data.getHeight(), + getMeasuredWidth(), getMeasuredHeight()); + mCenterX = curr.getLeftPosition() + dim[0] / 2; + } } // Check left |