|
|
@@ -12,9 +12,11 @@ import android.util.AttributeSet;
|
|
|
import android.util.Log;
|
|
|
import android.util.TypedValue;
|
|
|
import android.view.View;
|
|
|
+import android.view.WindowManager;
|
|
|
import android.view.animation.AccelerateDecelerateInterpolator;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.xzjmyk.pm.activity.util.DisplayUtil;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
@@ -48,7 +50,9 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
private float mTotalHeight =
|
|
|
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 250, getResources().getDisplayMetrics());
|
|
|
private float maxWidth =
|
|
|
- TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 330, getResources().getDisplayMetrics());
|
|
|
+ TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
|
|
|
+ 355,
|
|
|
+ getResources().getDisplayMetrics());
|
|
|
private float maxLineH =
|
|
|
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 120, getResources().getDisplayMetrics());
|
|
|
private float minLineH =
|
|
|
@@ -81,6 +85,8 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
|
|
|
this.mMoneys = moneys;
|
|
|
this.maxMoney = maxMoney;
|
|
|
this.colors=colors;
|
|
|
+ Log.i("FunnelMain", "setData:px:" + ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getWidth() );
|
|
|
+ Log.i("FunnelMain", "setData:dp:" + DisplayUtil.px2dip(getContext(),((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getWidth()));
|
|
|
stopAnimator();
|
|
|
init();
|
|
|
calculate();
|