From 2798b3ca238d52578e56d8051f07a6a813fe3987 Mon Sep 17 00:00:00 2001 From: Balys Valentukevicius Date: Sat, 6 Sep 2014 16:16:50 +0100 Subject: [PATCH] Modified X to CHECK bottom line width --- .../com/balysv/materialmenu/MaterialMenuDrawable.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/src/main/java/com/balysv/materialmenu/MaterialMenuDrawable.java b/library/src/main/java/com/balysv/materialmenu/MaterialMenuDrawable.java index 11cc9bd..e7e2ace 100644 --- a/library/src/main/java/com/balysv/materialmenu/MaterialMenuDrawable.java +++ b/library/src/main/java/com/balysv/materialmenu/MaterialMenuDrawable.java @@ -483,7 +483,7 @@ private void drawBottomLine(Canvas canvas, float ratio) { // shorten both ends startX += dip3 - dip3 * (1 - ratio); - stopX -= resolveStrokeModifier(1) - dip6 * (1 - ratio); + stopX -= resolveStrokeModifier(1 - ratio); break; } @@ -514,17 +514,17 @@ private boolean isMorphingForward() { private float resolveStrokeModifier(float ratio) { switch (stroke) { case REGULAR: - if (animationState == AnimationState.ARROW_X) { + if (animationState == AnimationState.ARROW_X || animationState == AnimationState.X_CHECK) { return dip3 - (dip6 * ratio); } return ratio * dip3; case THIN: - if (animationState == AnimationState.ARROW_X) { - return dip3 + diph - ((dip6 + diph) * ratio); + if (animationState == AnimationState.ARROW_X || animationState == AnimationState.X_CHECK) { + return dip3 + diph - (dip6 + diph) * ratio; } return ratio * (dip3 + diph); case EXTRA_THIN: - if (animationState == AnimationState.ARROW_X) { + if (animationState == AnimationState.ARROW_X || animationState == AnimationState.X_CHECK) { return dip4 - ((dip6 + dip1) * ratio); } return ratio * dip4;