From 11439c58546be37a309e99983ed40917408a2de2 Mon Sep 17 00:00:00 2001 From: Winson Date: Wed, 20 Jul 2016 14:25:07 -0700 Subject: [PATCH] Fixing small regressions from layout tweaks - Ensure that the caret is the right height - Ensure that the workspace page spacing matches the workspace padding, but just offscreen Bug: 30021487 Change-Id: Iaf4b33db0f6456b74986638fb6b6af78fc6e1859 --- src/com/android/launcher3/DeviceProfile.java | 2 +- src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index ac86f0b74..5828dfc57 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -392,7 +392,7 @@ public class DeviceProfile { // In portrait, we want the pages spaced such that there is no // overhang of the previous / next page into the current page viewport. // We assume symmetrical padding in portrait mode. - return Math.max(defaultPageSpacingPx, 2 * getWorkspacePadding(null).left); + return Math.max(defaultPageSpacingPx, getWorkspacePadding(null).left + 1); } } diff --git a/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java b/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java index 45df3690f..fbfb61ba5 100644 --- a/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java +++ b/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java @@ -148,7 +148,8 @@ public class PageIndicatorLineCaret extends PageIndicator { super.onLayout(changed, left, top, right, bottom); // Top/center align the caret in the page indicator space int l = (right - left) / 2 - mCaretSizePx / 2; - getCaretDrawable().setBounds(l, mCaretWorkspaceOffsetPx, l + mCaretSizePx, mCaretSizePx); + getCaretDrawable().setBounds(l, mCaretWorkspaceOffsetPx, l + mCaretSizePx, + mCaretWorkspaceOffsetPx + mCaretSizePx); // The touch area is expanded below this view by #mTouchExtensionHeight // which extends to the top of the hotseat. -- 2.11.0