diff options
author | Winson Chung <winsonc@google.com> | 2012-03-02 17:14:58 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-03-08 13:37:46 -0800 |
commit | eecf02da58adef5486bf0c9ff7127ea891f457a4 (patch) | |
tree | aa96fab5fb3528fdd838b4547922b8577112df7f /src/com/android/launcher2/PagedView.java | |
parent | 633f1aad55aea7afbefd8409ccfd1f693b27870b (diff) | |
download | android_packages_apps_Trebuchet-eecf02da58adef5486bf0c9ff7127ea891f457a4.tar.gz android_packages_apps_Trebuchet-eecf02da58adef5486bf0c9ff7127ea891f457a4.tar.bz2 android_packages_apps_Trebuchet-eecf02da58adef5486bf0c9ff7127ea891f457a4.zip |
Fixing some issues/regressions related to scaled icons.
- Fixes issue with folder icons being clipped in landscape in sw720dp (Bug: 6118397)
- Fixes issue with divider being in wrong orientation in sw720dp
- Fixes issue with scaled icons not being drawn with filtering
- Fixes issue with side pages showing under the hotseat when in landscape in phone UI
- Animates the drag view on pick up and drop
Change-Id: Iad26427ec63fcbc9bdb3b29a4645689ba445d5c8
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index e64b0c3a6..0854508e4 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -580,7 +580,14 @@ public abstract class PagedView extends ViewGroup { // Calculate the variable page spacing if necessary if (mPageSpacing < 0) { - setPageSpacing(((right - left) - getChildAt(0).getMeasuredWidth()) / 2); + // The gap between pages in the PagedView should be equal to the gap from the page + // to the edge of the screen (so it is not visible in the current screen). To + // account for unequal padding on each side of the paged view, we take the maximum + // of the left/right gap and use that as the gap between each page. + int offset = getRelativeChildOffset(0); + int spacing = Math.max(offset, (right - left) - offset - + getChildAt(0).getMeasuredWidth()); + setPageSpacing(spacing); } } |