|
|
@@ -18,7 +18,7 @@ import java.util.List;
|
|
|
/**
|
|
|
* Created by zhengjiong on 16/1/20.
|
|
|
*/
|
|
|
-public class FunnelView extends View implements ValueAnimator.AnimatorUpdateListener{
|
|
|
+public class FunnelView extends View implements ValueAnimator.AnimatorUpdateListener {
|
|
|
public static final float ANGLE_SCALE = 3.0f;
|
|
|
private List<Integer> mMoneys = new ArrayList<>();
|
|
|
private int maxMoney;
|
|
|
@@ -54,7 +54,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
private Path mPath10;
|
|
|
|
|
|
|
|
|
- private float mTotalHeight = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 240, getResources().getDisplayMetrics());
|
|
|
+ private float mTotalHeight = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 250, getResources().getDisplayMetrics());
|
|
|
|
|
|
private float mPath1Height;
|
|
|
private float mPath2Height;
|
|
|
@@ -79,8 +79,6 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
private float mPath10AngleWidth;
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
private float mPath3LineStartX;
|
|
|
private float mPath3LineStartY;
|
|
|
|
|
|
@@ -90,12 +88,12 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
private float mPath5LineStartX;
|
|
|
private float mPath5LineStartY;
|
|
|
|
|
|
- private float maxWidth = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 300, getResources().getDisplayMetrics());
|
|
|
+ private float maxWidth = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 330, getResources().getDisplayMetrics());
|
|
|
private float maxLineH = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 90, getResources().getDisplayMetrics());
|
|
|
private float minLineH = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5, getResources().getDisplayMetrics());
|
|
|
|
|
|
- private float startOffsetX = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30, getResources().getDisplayMetrics());
|
|
|
- private float startOffsetY = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, getResources().getDisplayMetrics());
|
|
|
+ private float startOffsetX = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5, getResources().getDisplayMetrics());
|
|
|
+ private float startOffsetY = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5, getResources().getDisplayMetrics());
|
|
|
|
|
|
private float lineStartOffsetX = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, getResources().getDisplayMetrics());
|
|
|
private float textStartOffsetX = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 7, getResources().getDisplayMetrics());
|
|
|
@@ -118,7 +116,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
init();
|
|
|
}
|
|
|
|
|
|
- public void setData(List<Integer> moneys, int maxMoney){
|
|
|
+ public void setData(List<Integer> moneys, int maxMoney) {
|
|
|
this.mMoneys = moneys;
|
|
|
this.maxMoney = maxMoney;
|
|
|
|
|
|
@@ -132,13 +130,13 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
private void calculate() {
|
|
|
for (int i = 0; i < mMoneys.size(); i++) {
|
|
|
int money = mMoneys.get(i);
|
|
|
- float scale = (float)money / maxMoney;
|
|
|
+ float scale = (float) money / maxMoney;
|
|
|
switch (i) {
|
|
|
case 0:
|
|
|
mPath1Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath1Height < minLineH * phaseX) {
|
|
|
mPath1Height = minLineH * phaseX;
|
|
|
- }else if (mPath1Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath1Height > maxLineH * phaseX) {
|
|
|
mPath1Height = maxLineH * phaseX;
|
|
|
}
|
|
|
mPath1AngleWidth = mPath1Height / ANGLE_SCALE;
|
|
|
@@ -160,7 +158,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath3Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath3Height < minLineH * phaseX) {
|
|
|
mPath3Height = minLineH * phaseX;
|
|
|
- }else if (mPath3Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath3Height > maxLineH * phaseX) {
|
|
|
mPath3Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -172,7 +170,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath4Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath4Height < minLineH * phaseX) {
|
|
|
mPath4Height = minLineH * phaseX;
|
|
|
- }else if (mPath4Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath4Height > maxLineH * phaseX) {
|
|
|
mPath4Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -184,7 +182,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath5Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath5Height < minLineH * phaseX) {
|
|
|
mPath5Height = minLineH * phaseX;
|
|
|
- }else if (mPath5Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath5Height > maxLineH * phaseX) {
|
|
|
mPath5Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -196,7 +194,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath6Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath6Height < minLineH * phaseX) {
|
|
|
mPath6Height = minLineH * phaseX;
|
|
|
- }else if (mPath6Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath6Height > maxLineH * phaseX) {
|
|
|
mPath6Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -206,7 +204,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath7Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath7Height < minLineH * phaseX) {
|
|
|
mPath7Height = minLineH * phaseX;
|
|
|
- }else if (mPath7Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath7Height > maxLineH * phaseX) {
|
|
|
mPath7Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -216,7 +214,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath8Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath8Height < minLineH * phaseX) {
|
|
|
mPath8Height = minLineH * phaseX;
|
|
|
- }else if (mPath8Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath8Height > maxLineH * phaseX) {
|
|
|
mPath8Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -226,7 +224,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath9Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath9Height < minLineH * phaseX) {
|
|
|
mPath9Height = minLineH * phaseX;
|
|
|
- }else if (mPath9Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath9Height > maxLineH * phaseX) {
|
|
|
mPath9Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -236,7 +234,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPath10Height = mTotalHeight * scale * phaseX;
|
|
|
if (mPath10Height < minLineH * phaseX) {
|
|
|
mPath10Height = minLineH * phaseX;
|
|
|
- }else if (mPath10Height > maxLineH * phaseX) {
|
|
|
+ } else if (mPath10Height > maxLineH * phaseX) {
|
|
|
mPath10Height = maxLineH * phaseX;
|
|
|
}
|
|
|
|
|
|
@@ -317,7 +315,6 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mPaint10.setAntiAlias(true);
|
|
|
|
|
|
|
|
|
-
|
|
|
mPaintLine.setColor(Color.parseColor("#A8ADB2"));
|
|
|
// mPaintLine.setColor(Color.parseColor("#A8ADB2"));
|
|
|
mPaintLine.setStyle(Paint.Style.FILL);
|
|
|
@@ -331,20 +328,20 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
|
|
|
private void draw1(Canvas canvas) {
|
|
|
mLastX = startOffsetX;
|
|
|
- mLastY = startOffsetY ;
|
|
|
- mLastWidth=maxWidth-startOffsetX;
|
|
|
+ mLastY = startOffsetY;
|
|
|
+ mLastWidth = maxWidth - startOffsetX;
|
|
|
|
|
|
mPath1 = new Path();
|
|
|
mPath1.moveTo(mLastX, startOffsetY);
|
|
|
- mPath1.lineTo(mLastX+mLastWidth , startOffsetY);
|
|
|
- mPath1.lineTo(mLastX+mLastWidth-mPath1AngleWidth, mLastY+ mPath1Height);
|
|
|
- mPath1.lineTo(mLastX + mPath1AngleWidth, mLastY+ mPath1Height);
|
|
|
+ mPath1.lineTo(mLastX + mLastWidth, startOffsetY);
|
|
|
+ mPath1.lineTo(mLastX + mLastWidth - mPath1AngleWidth, mLastY + mPath1Height);
|
|
|
+ mPath1.lineTo(mLastX + mPath1AngleWidth, mLastY + mPath1Height);
|
|
|
|
|
|
mPath1.close();
|
|
|
canvas.drawPath(mPath1, mPaint1);
|
|
|
- mLastWidth=mLastWidth-2*mPath1AngleWidth;
|
|
|
- mLastX=mLastX+mPath1AngleWidth;
|
|
|
- mLastY=mLastY+mPath1Height ;
|
|
|
+ mLastWidth = mLastWidth - 2 * mPath1AngleWidth;
|
|
|
+ mLastX = mLastX + mPath1AngleWidth;
|
|
|
+ mLastY = mLastY + mPath1Height;
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -353,14 +350,14 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
|
|
|
mPath2 = new Path();
|
|
|
|
|
|
- mPath2.moveTo(mLastX, mLastY);
|
|
|
- mPath2.lineTo(mLastX+mLastWidth, mLastY);
|
|
|
- mPath2.lineTo(mLastX +mLastWidth- mPath2AngleWidth, mLastY + mPath2Height);
|
|
|
- mPath2.lineTo(mLastX+mPath2AngleWidth, mLastY + mPath2Height);
|
|
|
+ mPath2.moveTo(mLastX, mLastY);
|
|
|
+ mPath2.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
+ mPath2.lineTo(mLastX + mLastWidth - mPath2AngleWidth, mLastY + mPath2Height);
|
|
|
+ mPath2.lineTo(mLastX + mPath2AngleWidth, mLastY + mPath2Height);
|
|
|
mPath2.close();
|
|
|
canvas.drawPath(mPath2, mPaint2);
|
|
|
|
|
|
- mLastWidth = mLastWidth - mPath2AngleWidth - mPath2AngleWidth;
|
|
|
+ mLastWidth = mLastWidth - mPath2AngleWidth - mPath2AngleWidth;
|
|
|
mLastX = mLastX + mPath2AngleWidth;
|
|
|
mLastY = mLastY + mPath2Height;
|
|
|
}
|
|
|
@@ -370,7 +367,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
|
|
|
mPath3 = new Path();
|
|
|
|
|
|
- mPath3.moveTo(mLastX, mLastY);
|
|
|
+ mPath3.moveTo(mLastX, mLastY);
|
|
|
mPath3.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
mPath3.lineTo(mLastX + mLastWidth - mPath3AngleWidth, mLastY + mPath3Height);
|
|
|
mPath3.lineTo(mLastX + mPath3AngleWidth, mLastY + mPath3Height);
|
|
|
@@ -380,7 +377,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mLastWidth = mLastWidth - mPath3AngleWidth - mPath3AngleWidth;
|
|
|
mLastX = mLastX + mPath3AngleWidth;
|
|
|
mLastY = mLastY + mPath3Height;
|
|
|
- mPath3LineStartX = mLastX + mLastWidth + mPath3AngleWidth / 2;
|
|
|
+ mPath3LineStartX = mLastX + mLastWidth + mPath3AngleWidth / 2;
|
|
|
mPath3LineStartY = mLastY - mPath3Height / 2;
|
|
|
}
|
|
|
|
|
|
@@ -388,7 +385,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
|
|
|
mPath4 = new Path();
|
|
|
|
|
|
- mPath4.moveTo(mLastX, mLastY);
|
|
|
+ mPath4.moveTo(mLastX, mLastY);
|
|
|
mPath4.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
mPath4.lineTo(mLastX + mLastWidth - mPath4AngleWidth, mLastY + mPath4Height);
|
|
|
mPath4.lineTo(mLastX + mPath4AngleWidth, mLastY + mPath4Height);
|
|
|
@@ -398,17 +395,17 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
mLastWidth = mLastWidth - 2 * mPath4AngleWidth;//最新长度
|
|
|
mLastX = mLastX + mPath4AngleWidth;//第四个点的x坐标
|
|
|
mLastY = mLastY + mPath4Height;//第四个点的y坐标
|
|
|
- mPath4LineStartX = mLastX + mLastWidth + mPath4AngleWidth / 2;
|
|
|
+ mPath4LineStartX = mLastX + mLastWidth + mPath4AngleWidth / 2;
|
|
|
mPath4LineStartY = mLastY - mPath4Height / 2;
|
|
|
}
|
|
|
|
|
|
private void draw5(Canvas canvas) {
|
|
|
mPath5 = new Path();
|
|
|
|
|
|
- mPath5.moveTo(mLastX, mLastY);
|
|
|
+ mPath5.moveTo(mLastX, mLastY);
|
|
|
mPath5.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
- mPath5.lineTo(mLastX +mLastWidth-mPath5AngleWidth, mLastY + mPath5Height);
|
|
|
- mPath5.lineTo(mLastX+mPath5AngleWidth, mLastY + mPath5Height);
|
|
|
+ mPath5.lineTo(mLastX + mLastWidth - mPath5AngleWidth, mLastY + mPath5Height);
|
|
|
+ mPath5.lineTo(mLastX + mPath5AngleWidth, mLastY + mPath5Height);
|
|
|
mPath5.close();
|
|
|
canvas.drawPath(mPath5, mPaint5);
|
|
|
|
|
|
@@ -425,13 +422,12 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
private void draw6(Canvas canvas) {
|
|
|
mPath6 = new Path();
|
|
|
- mPath6.moveTo(mLastX, mLastY);
|
|
|
+ mPath6.moveTo(mLastX, mLastY);
|
|
|
mPath6.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
- mPath6.lineTo(mLastX +mLastWidth-mPath6AngleWidth, mLastY + mPath6Height);
|
|
|
- mPath6.lineTo(mLastX+mPath6AngleWidth, mLastY + mPath6Height);
|
|
|
+ mPath6.lineTo(mLastX + mLastWidth - mPath6AngleWidth, mLastY + mPath6Height);
|
|
|
+ mPath6.lineTo(mLastX + mPath6AngleWidth, mLastY + mPath6Height);
|
|
|
mPath6.close();
|
|
|
canvas.drawPath(mPath6, mPaint6);
|
|
|
mLastWidth = mLastWidth - 2 * mPath6AngleWidth;//最新长度
|
|
|
@@ -440,13 +436,12 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
private void draw7(Canvas canvas) {
|
|
|
mPath7 = new Path();
|
|
|
- mPath7.moveTo(mLastX, mLastY);
|
|
|
+ mPath7.moveTo(mLastX, mLastY);
|
|
|
mPath7.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
- mPath7.lineTo(mLastX +mLastWidth-mPath7AngleWidth, mLastY + mPath7Height);
|
|
|
- mPath7.lineTo(mLastX+mPath7AngleWidth, mLastY + mPath7Height);
|
|
|
+ mPath7.lineTo(mLastX + mLastWidth - mPath7AngleWidth, mLastY + mPath7Height);
|
|
|
+ mPath7.lineTo(mLastX + mPath7AngleWidth, mLastY + mPath7Height);
|
|
|
mPath7.close();
|
|
|
canvas.drawPath(mPath7, mPaint7);
|
|
|
mLastWidth = mLastWidth - 2 * mPath7AngleWidth;//最新长度
|
|
|
@@ -457,10 +452,10 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
|
|
|
private void draw8(Canvas canvas) {
|
|
|
mPath8 = new Path();
|
|
|
- mPath8.moveTo(mLastX, mLastY);
|
|
|
+ mPath8.moveTo(mLastX, mLastY);
|
|
|
mPath8.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
- mPath8.lineTo(mLastX +mLastWidth-mPath8AngleWidth, mLastY + mPath8Height);
|
|
|
- mPath8.lineTo(mLastX+mPath8AngleWidth, mLastY + mPath8Height);
|
|
|
+ mPath8.lineTo(mLastX + mLastWidth - mPath8AngleWidth, mLastY + mPath8Height);
|
|
|
+ mPath8.lineTo(mLastX + mPath8AngleWidth, mLastY + mPath8Height);
|
|
|
mPath8.close();
|
|
|
canvas.drawPath(mPath8, mPaint8);
|
|
|
mLastWidth = mLastWidth - 2 * mPath8AngleWidth;//最新长度
|
|
|
@@ -469,13 +464,12 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
private void draw9(Canvas canvas) {
|
|
|
mPath9 = new Path();
|
|
|
- mPath9.moveTo(mLastX, mLastY);
|
|
|
+ mPath9.moveTo(mLastX, mLastY);
|
|
|
mPath9.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
- mPath9.lineTo(mLastX +mLastWidth-mPath9AngleWidth, mLastY + mPath9Height);
|
|
|
- mPath9.lineTo(mLastX+mPath9AngleWidth, mLastY + mPath9Height);
|
|
|
+ mPath9.lineTo(mLastX + mLastWidth - mPath9AngleWidth, mLastY + mPath9Height);
|
|
|
+ mPath9.lineTo(mLastX + mPath9AngleWidth, mLastY + mPath9Height);
|
|
|
mPath9.close();
|
|
|
canvas.drawPath(mPath9, mPaint9);
|
|
|
mLastWidth = mLastWidth - 2 * mPath9AngleWidth;//最新长度
|
|
|
@@ -486,10 +480,10 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
|
|
|
private void draw10(Canvas canvas) {
|
|
|
mPath10 = new Path();
|
|
|
- mPath10.moveTo(mLastX, mLastY);
|
|
|
+ mPath10.moveTo(mLastX, mLastY);
|
|
|
mPath10.lineTo(mLastX + mLastWidth, mLastY);
|
|
|
- mPath10.lineTo(mLastX +mLastWidth-mPath10AngleWidth, mLastY + mPath10Height);
|
|
|
- mPath10.lineTo(mLastX+mPath10AngleWidth, mLastY + mPath10Height);
|
|
|
+ mPath10.lineTo(mLastX + mLastWidth - mPath10AngleWidth, mLastY + mPath10Height);
|
|
|
+ mPath10.lineTo(mLastX + mPath10AngleWidth, mLastY + mPath10Height);
|
|
|
mPath10.close();
|
|
|
canvas.drawPath(mPath10, mPaint10);
|
|
|
mLastWidth = mLastWidth - 2 * mPath10AngleWidth;//最新长度
|
|
|
@@ -501,34 +495,34 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
protected void onDraw(Canvas canvas) {
|
|
|
super.onDraw(canvas);
|
|
|
draw1(canvas);
|
|
|
- // drawText1(canvas);
|
|
|
+ // drawText1(canvas);
|
|
|
|
|
|
|
|
|
draw2(canvas);
|
|
|
- drawText2(canvas);
|
|
|
+ // drawText2(canvas);
|
|
|
|
|
|
draw3(canvas);
|
|
|
- // drawLine3(canvas);
|
|
|
- // drawText3(canvas);
|
|
|
+ // drawLine3(canvas);
|
|
|
+ // drawText3(canvas);
|
|
|
|
|
|
draw4(canvas);
|
|
|
- // drawLine4(canvas);
|
|
|
- // drawText4(canvas);
|
|
|
+ // drawLine4(canvas);
|
|
|
+ // drawText4(canvas);
|
|
|
|
|
|
draw5(canvas);
|
|
|
- // drawLine5(canvas);
|
|
|
- // drawText5(canvas);
|
|
|
+ // drawLine5(canvas);
|
|
|
+ // drawText5(canvas);
|
|
|
|
|
|
|
|
|
draw6(canvas);
|
|
|
draw7(canvas);
|
|
|
draw8(canvas);
|
|
|
draw9(canvas);
|
|
|
- // draw10(canvas);
|
|
|
+ // draw10(canvas);
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void animateY(){
|
|
|
+ public void animateY() {
|
|
|
ObjectAnimator xAnimator = ObjectAnimator.ofFloat(this, "phaseX", 0, 1);
|
|
|
xAnimator.setDuration(2000);
|
|
|
xAnimator.addUpdateListener(this);
|
|
|
@@ -621,7 +615,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
canvas.drawText("呈报方案(10%)", maxWidth + textStartOffsetX, mLastY - mPath3Height / 2 + offY, mPaintText);
|
|
|
}
|
|
|
|
|
|
- private void drawLine4(Canvas canvas){
|
|
|
+ private void drawLine4(Canvas canvas) {
|
|
|
canvas.drawLine(mPath4LineStartX + lineStartOffsetX, mPath4LineStartY, maxWidth, mPath4LineStartY, mPaintLine);
|
|
|
}
|
|
|
|
|
|
@@ -636,7 +630,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
canvas.drawText("商务谈判(10%)", maxWidth + textStartOffsetX, mLastY - mPath4Height / 2 + offY, mPaintText);
|
|
|
}
|
|
|
|
|
|
- private void drawLine5(Canvas canvas){
|
|
|
+ private void drawLine5(Canvas canvas) {
|
|
|
canvas.drawLine(mPath5LineStartX + lineStartOffsetX, mPath5LineStartY, maxWidth, mPath5LineStartY, mPaintLine);
|
|
|
}
|
|
|
|