diff --git a/mobile/android/base/CanvasDelegate.java b/mobile/android/base/CanvasDelegate.java index 7f8254fbcbfa..d9fafdc73b4e 100644 --- a/mobile/android/base/CanvasDelegate.java +++ b/mobile/android/base/CanvasDelegate.java @@ -31,6 +31,7 @@ public class CanvasDelegate { mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setColor(0xFFFF0000); + mPaint.setStrokeWidth(0.0f); } public void draw(Canvas canvas, Path path, int width, int height) { diff --git a/mobile/android/base/TabsButton.java b/mobile/android/base/TabsButton.java index 840b49d9a246..ae7419d586ad 100644 --- a/mobile/android/base/TabsButton.java +++ b/mobile/android/base/TabsButton.java @@ -23,7 +23,6 @@ public class TabsButton extends ShapedButton { private Path mRightCurve; private boolean mCropped; - private int mFullWidth; public TabsButton(Context context, AttributeSet attrs) { super(context, attrs); @@ -36,6 +35,7 @@ public class TabsButton extends ShapedButton { mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setColor(0xFF000000); + mPaint.setStrokeWidth(0.0f); // Path is masked. mPath = new Path(); @@ -43,9 +43,6 @@ public class TabsButton extends ShapedButton { mLeftCurve = new Path(); mRightCurve = new Path(); mCanvasDelegate = new CanvasDelegate(this, Mode.DST_IN); - - // Path might extend beyond the screen for smaller tabs button. - mFullWidth = (int) context.getResources().getDimension(R.dimen.tabs_button_full_width); } @Override @@ -64,11 +61,11 @@ public class TabsButton extends ShapedButton { if (mSide == CurveTowards.RIGHT) { left = 0; - right = mFullWidth; + right = width; top = 0; bottom = height; } else { - left = width - mFullWidth; + left = 0; right = width; top = height; bottom = 0; @@ -78,9 +75,8 @@ public class TabsButton extends ShapedButton { mLeftCurve.moveTo(left, top); if (mCropped && mSide == CurveTowards.LEFT) { - mLeftCurve.cubicTo(left + curve, top, - left, bottom, - left + curve, bottom); + mLeftCurve.lineTo(left, top/2); + mLeftCurve.quadTo(left * 0.95f, top * 0.05f, left + curve/2, bottom); } else { mLeftCurve.cubicTo(left + (curve * 0.75f), top, left + (curve * 0.25f), bottom, @@ -91,9 +87,8 @@ public class TabsButton extends ShapedButton { mRightCurve.moveTo(right, bottom); if (mCropped && mSide == CurveTowards.RIGHT) { - mRightCurve.cubicTo(right - curve, bottom, - right, top, - right - curve, top); + mRightCurve.lineTo(right, bottom/2); + mRightCurve.quadTo(right * 0.95f, bottom * 0.05f, right - (curve/2), top); } else { mRightCurve.cubicTo(right - (curve * 0.75f), bottom, right - (curve * 0.25f), top, diff --git a/mobile/android/base/resources/values-land-v14/dimens.xml b/mobile/android/base/resources/values-land-v14/dimens.xml index bb154a5ec0ca..f9c3194774c2 100644 --- a/mobile/android/base/resources/values-land-v14/dimens.xml +++ b/mobile/android/base/resources/values-land-v14/dimens.xml @@ -8,6 +8,5 @@ 40dp 46dp 18sp - 80dp diff --git a/mobile/android/base/resources/values-large-v11/dimens.xml b/mobile/android/base/resources/values-large-v11/dimens.xml index a20367581e7c..de24d5e86a53 100644 --- a/mobile/android/base/resources/values-large-v11/dimens.xml +++ b/mobile/android/base/resources/values-large-v11/dimens.xml @@ -8,6 +8,5 @@ 56dp 45dp 26sp - 115dp diff --git a/mobile/android/base/resources/values-xlarge-v11/dimens.xml b/mobile/android/base/resources/values-xlarge-v11/dimens.xml index 56353587bd9a..e9b2139c6a7f 100644 --- a/mobile/android/base/resources/values-xlarge-v11/dimens.xml +++ b/mobile/android/base/resources/values-xlarge-v11/dimens.xml @@ -16,6 +16,5 @@ 48dp 28dp 26sp - 115dp diff --git a/mobile/android/base/resources/values/dimens.xml b/mobile/android/base/resources/values/dimens.xml index cb0349c5c144..8520f857bf9d 100644 --- a/mobile/android/base/resources/values/dimens.xml +++ b/mobile/android/base/resources/values/dimens.xml @@ -32,7 +32,6 @@ 400dp 78dp 136dp - 98dp 22sp 2dp 30dp