com.github.mikephil.charting.utils.Utils.init()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中com.github.mikephil.charting.utils.Utils.init()方法的一些代码示例,展示了Utils.init()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.init()方法的具体详情如下:
包路径:com.github.mikephil.charting.utils.Utils
类名称:Utils
方法名:init

Utils.init介绍

[英]initialize method, called inside the Chart.init() method.
[中]初始化方法,在图表中调用。init()方法。

代码示例

代码示例来源:origin: PhilJay/MPAndroidChart

/**
 * initialize all paints and stuff
 */
protected void init() {
  setWillNotDraw(false);
  // setLayerType(View.LAYER_TYPE_HARDWARE, null);
  mAnimator = new ChartAnimator(new AnimatorUpdateListener() {
    @Override
    public void onAnimationUpdate(ValueAnimator animation) {
      // ViewCompat.postInvalidateOnAnimation(Chart.this);
      postInvalidate();
    }
  });
  // initialize the utils
  Utils.init(getContext());
  mMaxHighlightDistance = Utils.convertDpToPixel(500f);
  mDescription = new Description();
  mLegend = new Legend();
  mLegendRenderer = new LegendRenderer(mViewPortHandler, mLegend);
  mXAxis = new XAxis();
  mDescPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
  mInfoPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
  mInfoPaint.setColor(Color.rgb(247, 189, 51)); // orange
  mInfoPaint.setTextAlign(Align.CENTER);
  mInfoPaint.setTextSize(Utils.convertDpToPixel(12f));
  if (mLogEnabled)
    Log.i("", "Chart.init()");
}

代码示例来源:origin: PhilJay/MPAndroidChart

Utils.init(this);

代码示例来源:origin: com.github.PhilJay/MPAndroidChart

Utils.init(getContext());
mMaxHighlightDistance = Utils.convertDpToPixel(500f);

代码示例来源:origin: WenWangAndroid/ChartManager

Utils.init(getContext());
mMaxHighlightDistance = Utils.convertDpToPixel(500f);

代码示例来源:origin: xiaolongonly/Ticket-Analysis

Utils.init(getContext());
mMaxHighlightDistance = Utils.convertDpToPixel(500f);

代码示例来源:origin: zhuanghongji/mp-android-chart

mContext = this;
Utils.init(this);

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

Utils.init(getContext());
mMaxHighlightDistance = Utils.convertDpToPixel(500f);

相关文章