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

Commit 24251b68 authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Fixing tiny issue with empty state graphic not being centered correctly.

- The centering is based on the size not including insets, so it should
  be offset by the top/left insets.

Bug: 28005632
Change-Id: I114bcaadddb0d4777d4c013097c0d1a20e4fab0b
parent 9d8ec0f1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -367,8 +367,10 @@ public class RecentsView extends FrameLayout {
            int topBottomInsets = mSystemInsets.top + mSystemInsets.bottom;
            int childWidth = mEmptyView.getMeasuredWidth();
            int childHeight = mEmptyView.getMeasuredHeight();
            int childLeft = left + Math.max(0, (right - left - leftRightInsets - childWidth)) / 2;
            int childTop = top + Math.max(0, (bottom - top - topBottomInsets - childHeight)) / 2;
            int childLeft = left + mSystemInsets.left +
                    Math.max(0, (right - left - leftRightInsets - childWidth)) / 2;
            int childTop = top + mSystemInsets.top +
                    Math.max(0, (bottom - top - topBottomInsets - childHeight)) / 2;
            mEmptyView.layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
        }