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

Commit 13da52a2 authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "Fix layout of MultiWaveView and GlowPadView." into cm-10.1

parents 73e2c7ac 488b6feb
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -1182,17 +1182,13 @@ public class GlowPadView extends View {
    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        final int width = right - left;
        final int height = bottom - top;

        // Target placement width/height. This puts the targets on the greater of the ring
        // width or the specified outer radius.
        final float placementWidth = getRingWidth();
        final float placementHeight = getRingHeight();
        float newWaveCenterX = mHorizontalInset
                + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
        float newWaveCenterY = mVerticalInset
                + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
        float newWaveCenterX = mHorizontalInset + (mMaxTargetWidth + placementWidth) / 2;
        float newWaveCenterY = mVerticalInset + (mMaxTargetHeight + placementHeight) / 2;

        if (mInitialLayout) {
            stopAndHideWaveAnimation();
+2 −6
Original line number Diff line number Diff line
@@ -1006,17 +1006,13 @@ public class MultiWaveView extends View {
    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        final int width = right - left;
        final int height = bottom - top;

        // Target placement width/height. This puts the targets on the greater of the ring
        // width or the specified outer radius.
        final float placementWidth = Math.max(mOuterRing.getWidth(), 2 * mOuterRadius);
        final float placementHeight = Math.max(mOuterRing.getHeight(), 2 * mOuterRadius);
        float newWaveCenterX = mHorizontalInset
                + Math.max(width, mMaxTargetWidth + placementWidth) / 2;
        float newWaveCenterY = mVerticalInset
                + Math.max(height, + mMaxTargetHeight + placementHeight) / 2;
        float newWaveCenterX = mHorizontalInset + (mMaxTargetWidth + placementWidth) / 2;
        float newWaveCenterY = mVerticalInset + (mMaxTargetHeight + placementHeight) / 2;

        if (mInitialLayout) {
            hideChevrons();