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

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

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

Utils.getSDKInt介绍

暂无

代码示例

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

/**
   * Clip path with hardware acceleration only working properly on API level 18 and above.
   *
   * @return
   */
  private boolean clipPathSupported() {
    return Utils.getSDKInt() >= 18;
  }
}

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

/**
 * Draws the provided path in filled mode with the provided drawable.
 *
 * @param c
 * @param filledPath
 * @param drawable
 */
protected void drawFilledPath(Canvas c, Path filledPath, Drawable drawable) {
  if (clipPathSupported()) {
    int save = c.save();
    c.clipPath(filledPath);
    drawable.setBounds((int) mViewPortHandler.contentLeft(),
        (int) mViewPortHandler.contentTop(),
        (int) mViewPortHandler.contentRight(),
        (int) mViewPortHandler.contentBottom());
    drawable.draw(c);
    c.restoreToCount(save);
  } else {
    throw new RuntimeException("Fill-drawables not (yet) supported below API level 18, " +
        "this code was run on API level " + Utils.getSDKInt() + ".");
  }
}

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

if (Utils.getSDKInt() >= 18) {

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

/**
   * Clip path with hardware acceleration only working properly on API level 18 and above.
   *
   * @return
   */
  private boolean clipPathSupported() {
    return Utils.getSDKInt() >= 18;
  }
}

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

/**
   * Clip path with hardware acceleration only working properly on API level 18 and above.
   *
   * @return
   */
  private boolean clipPathSupported() {
    return Utils.getSDKInt() >= 18;
  }
}

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

/**
   * Clip path with hardware acceleration only working properly on API level 18 and above.
   *
   * @return
   */
  private boolean clipPathSupported() {
    return Utils.getSDKInt() >= 18;
  }
}

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

/**
   * Clip path with hardware acceleration only working properly on API level 18 and above.
   *
   * @return
   */
  private boolean clipPathSupported() {
    return Utils.getSDKInt() >= 18;
  }
}

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

/**
 * Draws the provided path in filled mode with the provided drawable.
 *
 * @param c
 * @param filledPath
 * @param drawable
 */
protected void drawFilledPath(Canvas c, Path filledPath, Drawable drawable) {
  if (clipPathSupported()) {
    int save = c.save();
    c.clipPath(filledPath);
    drawable.setBounds((int) mViewPortHandler.contentLeft(),
        (int) mViewPortHandler.contentTop(),
        (int) mViewPortHandler.contentRight(),
        (int) mViewPortHandler.contentBottom());
    drawable.draw(c);
    c.restoreToCount(save);
  } else {
    throw new RuntimeException("Fill-drawables not (yet) supported below API level 18, " +
        "this code was run on API level " + Utils.getSDKInt() + ".");
  }
}

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

/**
 * Draws the provided path in filled mode with the provided drawable.
 *
 * @param c
 * @param filledPath
 * @param drawable
 */
protected void drawFilledPath(Canvas c, Path filledPath, Drawable drawable) {
  if (clipPathSupported()) {
    int save = c.save();
    c.clipPath(filledPath);
    drawable.setBounds((int) mViewPortHandler.contentLeft(),
        (int) mViewPortHandler.contentTop(),
        (int) mViewPortHandler.contentRight(),
        (int) mViewPortHandler.contentBottom());
    drawable.draw(c);
    c.restoreToCount(save);
  } else {
    throw new RuntimeException("Fill-drawables not (yet) supported below API level 18, " +
        "this code was run on API level " + Utils.getSDKInt() + ".");
  }
}

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

/**
 * Draws the provided path in filled mode with the provided drawable.
 *
 * @param c
 * @param filledPath
 * @param drawable
 */
protected void drawFilledPath(Canvas c, Path filledPath, Drawable drawable) {
  if (clipPathSupported()) {
    int save = c.save();
    c.clipPath(filledPath);
    drawable.setBounds((int) mViewPortHandler.contentLeft(),
        (int) mViewPortHandler.contentTop(),
        (int) mViewPortHandler.contentRight(),
        (int) mViewPortHandler.contentBottom());
    drawable.draw(c);
    c.restoreToCount(save);
  } else {
    throw new RuntimeException("Fill-drawables not (yet) supported below API level 18, " +
        "this code was run on API level " + Utils.getSDKInt() + ".");
  }
}

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

/**
 * Draws the provided path in filled mode with the provided drawable.
 *
 * @param c
 * @param filledPath
 * @param drawable
 */
protected void drawFilledPath(Canvas c, Path filledPath, Drawable drawable) {
  if (clipPathSupported()) {
    int save = c.save();
    c.clipPath(filledPath);
    drawable.setBounds((int) mViewPortHandler.contentLeft(),
        (int) mViewPortHandler.contentTop(),
        (int) mViewPortHandler.contentRight(),
        (int) mViewPortHandler.contentBottom());
    drawable.draw(c);
    c.restoreToCount(save);
  } else {
    throw new RuntimeException("Fill-drawables not (yet) supported below API level 18, " +
        "this code was run on API level " + Utils.getSDKInt() + ".");
  }
}

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

set1.setFormSize(15.f);
if (Utils.getSDKInt() >= 18) {

相关文章