diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 81c2337713..c0a1e0a605 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -284,7 +284,8 @@ 6dp 16dp - 32dp + + 35dp 2dp 100dp 4dp diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java index 685e4f1f3d..e3314d4b38 100644 --- a/src/com/android/launcher3/popup/ArrowPopup.java +++ b/src/com/android/launcher3/popup/ArrowPopup.java @@ -127,6 +127,7 @@ public abstract class ArrowPopup protected final float mElevation; + // Tag for Views that have children that will need to be iterated to add styling. private final String mIterateChildrenTag; protected final int[] mColorIds; @@ -244,7 +245,7 @@ public abstract class ArrowPopup for (int i = 0; i < count; i++) { View view = viewGroup.getChildAt(i); if (view.getVisibility() == VISIBLE) { - if (lastView != null) { + if (lastView != null && (isShortcutContainer(lastView))) { MarginLayoutParams mlp = (MarginLayoutParams) lastView.getLayoutParams(); mlp.bottomMargin = mChildContainerMargin; } diff --git a/src/com/android/launcher3/views/OptionsPopupView.java b/src/com/android/launcher3/views/OptionsPopupView.java index cf590855b7..cbc85b60d8 100644 --- a/src/com/android/launcher3/views/OptionsPopupView.java +++ b/src/com/android/launcher3/views/OptionsPopupView.java @@ -149,6 +149,13 @@ public class OptionsPopupView extends Arrow public void assignMarginsAndBackgrounds(ViewGroup viewGroup) { assignMarginsAndBackgrounds(viewGroup, getColorStateList(getContext(), mColorIds[0]).getDefaultColor()); + // last shortcut doesn't need bottom margin + final int count = viewGroup.getChildCount() - 1; + for (int i = 0; i < count; i++) { + // These are shortcuts and not shortcut containers, but they still need bottom margin + MarginLayoutParams mlp = (MarginLayoutParams) viewGroup.getChildAt(i).getLayoutParams(); + mlp.bottomMargin = mChildContainerMargin; + } } public static OptionsPopupView show(