Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5eae6642 authored by Xiaowen Lei's avatar Xiaowen Lei Committed by Android (Google) Code Review
Browse files

Merge "Don't add padding for Smartspace (actual and preview)." into main

parents d226042c 6c76501e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -158,6 +158,11 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
            final PointF appWidgetScale = dp.getAppWidgetScale((ItemInfo) child.getTag());
            lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
                    appWidgetScale.x, appWidgetScale.y, mBorderSpace, dp.widgetPadding);
        } else if (isChildQsb(child)) {
            lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
                    mBorderSpace);
            // No need to add padding for Qsb, which is either Smartspace (actual or preview), or
            // QsbContainerView.
        } else {
            lp.setup(mCellWidth, mCellHeight, invertLayoutHorizontally(), mCountX, mCountY,
                    mBorderSpace);
@@ -185,6 +190,10 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
        child.measure(childWidthMeasureSpec, childheightMeasureSpec);
    }

    private boolean isChildQsb(View child) {
        return child.getId() == R.id.search_container_workspace;
    }

    public boolean invertLayoutHorizontally() {
        return mInvertIfRtl && Utilities.isRtl(getResources());
    }