diff --git a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java index 51c047c67c..f7afcb9df3 100644 --- a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java +++ b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java @@ -543,15 +543,19 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler { secondarySnapshotWidth = parentWidth; secondarySnapshotHeight = totalThumbnailHeight - primarySnapshotHeight - dividerBar; - secondarySnapshot.setTranslationY(0); - primarySnapshot.setTranslationY(secondarySnapshotHeight + spaceAboveSnapshot + dividerBar); + + int translationY = primarySnapshotHeight + spaceAboveSnapshot + dividerBar; + primarySnapshot.setTranslationY(spaceAboveSnapshot); + secondarySnapshot.setTranslationY(translationY - spaceAboveSnapshot); + primarySnapshot.measure( View.MeasureSpec.makeMeasureSpec(primarySnapshotWidth, View.MeasureSpec.EXACTLY), - View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY)); + View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY) + ); secondarySnapshot.measure( View.MeasureSpec.makeMeasureSpec(secondarySnapshotWidth, View.MeasureSpec.EXACTLY), - View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight, - View.MeasureSpec.EXACTLY)); + View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight, View.MeasureSpec.EXACTLY) + ); } @Override diff --git a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java index 04b6710064..87437bd418 100644 --- a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java +++ b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java @@ -644,11 +644,12 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler { secondarySnapshotHeight = totalThumbnailHeight; secondarySnapshotWidth = parentWidth - primarySnapshotWidth - scaledDividerBar; - int translationX = primarySnapshotWidth + scaledDividerBar; if (isRtl) { + int translationX = secondarySnapshotWidth + scaledDividerBar; primarySnapshot.setTranslationX(-translationX); secondarySnapshot.setTranslationX(0); } else { + int translationX = primarySnapshotWidth + scaledDividerBar; secondarySnapshot.setTranslationX(translationX); primarySnapshot.setTranslationX(0); } diff --git a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java index 06526a876e..dcbf7d1a12 100644 --- a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java +++ b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java @@ -343,13 +343,15 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler { secondarySnapshotHeight = totalThumbnailHeight - primarySnapshotHeight - dividerBar; secondarySnapshot.setTranslationY(0); primarySnapshot.setTranslationY(secondarySnapshotHeight + spaceAboveSnapshot + dividerBar); + primarySnapshot.measure( View.MeasureSpec.makeMeasureSpec(primarySnapshotWidth, View.MeasureSpec.EXACTLY), - View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY)); + View.MeasureSpec.makeMeasureSpec(primarySnapshotHeight, View.MeasureSpec.EXACTLY) + ); secondarySnapshot.measure( View.MeasureSpec.makeMeasureSpec(secondarySnapshotWidth, View.MeasureSpec.EXACTLY), - View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight, - View.MeasureSpec.EXACTLY)); + View.MeasureSpec.makeMeasureSpec(secondarySnapshotHeight, View.MeasureSpec.EXACTLY) + ); } /* ---------- The following are only used by TaskViewTouchHandler. ---------- */