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

Commit caebf6ff authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "QS: Recenter feedback for non-dual tiles."

parents f9e44ea7 529aa73a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ public class QSTileView extends ViewGroup {
    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        final int w = getMeasuredWidth();
        final int h = getMeasuredHeight();

        int top = 0;
        top += mTileSpacingPx;
@@ -199,8 +200,8 @@ public class QSTileView extends ViewGroup {
        if (mRipple != null) {
            // center the touch feedback on the center of the icon, and dial it down a bit
            final int cx = w / 2;
            final int cy = mIcon.getTop() + mIcon.getHeight() / 2;
            final int rad = (int)(mIcon.getHeight() * 1.5);
            final int cy = mDual ? mIcon.getTop() + mIcon.getHeight() / 2 : h / 2;
            final int rad = (int)(mIcon.getHeight() * 1.25);
            mRipple.setHotspotBounds(cx - rad, cy - rad, cx + rad, cy + rad);
        }
        top = mIcon.getBottom();