diff options
author | Alan Newberger <alann@google.com> | 2015-01-30 15:49:18 -0800 |
---|---|---|
committer | Alan Newberger <alann@google.com> | 2015-01-30 16:01:14 -0800 |
commit | 34ac66e6d0bb849fb24a6255328390aba204abe3 (patch) | |
tree | 3ea9ea226239de0f2a2f9e9aa192eccaf2238231 /src/com/android/camera/widget | |
parent | a9be9d1a30c594e1489505d36e83cf91e332c60b (diff) | |
download | android_packages_apps_Camera2-34ac66e6d0bb849fb24a6255328390aba204abe3.tar.gz android_packages_apps_Camera2-34ac66e6d0bb849fb24a6255328390aba204abe3.tar.bz2 android_packages_apps_Camera2-34ac66e6d0bb849fb24a6255328390aba204abe3.zip |
Ensure right non-neighbors are invisible during filmstrip item scaling
Only the immediate right hand neighbor should fade out and translate to
center when drag-scaling the centered filmstrip item. Regression from G
to H, this CL ensures only the immediate neighbor is visible.
Bug: 19127110
Change-Id: I4023b91c384abd2b139b04124167cce8cb50c618
Diffstat (limited to 'src/com/android/camera/widget')
-rw-r--r-- | src/com/android/camera/widget/FilmstripView.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/camera/widget/FilmstripView.java b/src/com/android/camera/widget/FilmstripView.java index f910b16e0..0d3cee495 100644 --- a/src/com/android/camera/widget/FilmstripView.java +++ b/src/com/android/camera/widget/FilmstripView.java @@ -1286,19 +1286,27 @@ public class FilmstripView extends ViewGroup { // It's in full-screen mode. fadeAndScaleRightViewItem(i); } else { - boolean setToVisible = (curr.getVisibility() == INVISIBLE); + boolean isVisible = (curr.getVisibility() == VISIBLE); + boolean setToVisible = !isVisible; if (i == BUFFER_CENTER + 1) { + // right hand neighbor needs to fade based on scale of + // center curr.setAlpha(1f - scaleFraction); } else { if (scaleFraction == 0f) { curr.setAlpha(1f); } else { + // further right items should not display when center + // is being scaled setToVisible = false; + if (isVisible) { + curr.setVisibility(INVISIBLE); + } } } - if (setToVisible) { + if (setToVisible && !isVisible) { curr.setVisibility(VISIBLE); } |