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

Commit 26b01425 authored by Tony Wickham's avatar Tony Wickham
Browse files

Don't add offset to CellLayout's fullscreen children.

Bug: 25411084
Change-Id: Ifbcd0a53cf04a7fc29386f4f09aaf7f972e7354a
parent 3cfa97d4
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -899,9 +899,14 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {

    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        boolean isFullscreen = mShortcutsAndWidgets.getChildCount() > 0 &&
                ((LayoutParams) mShortcutsAndWidgets.getChildAt(0).getLayoutParams()).isFullscreen;
        int left = getPaddingLeft();
        if (!isFullscreen) {
            int offset = getMeasuredWidth() - getPaddingLeft() - getPaddingRight() -
                    (mCountX * mCellWidth);
        int left = getPaddingLeft() + (int) Math.ceil(offset / 2f);
            left += (int) Math.ceil(offset / 2f);
        }
        int top = getPaddingTop();

        mTouchFeedbackView.layout(left, top,
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;

public class ShortcutAndWidgetContainer extends ViewGroup {
    static final String TAG = "CellLayoutChildren";