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

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

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

Utils.postInvalidateOnAnimation介绍

[英]Original method view.postInvalidateOnAnimation() only supportd in API >= 16, This is a replica of the code from ViewCompat.
[中]原始方法视图。postInvalidateOnAnimation()仅在API>=16中支持,这是来自ViewCompat的代码的副本。

代码示例

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

public void computeScroll() {
  if (mDecelerationAngularVelocity == 0.f)
    return; // There's no deceleration in progress
  final long currentTime = AnimationUtils.currentAnimationTimeMillis();
  mDecelerationAngularVelocity *= mChart.getDragDecelerationFrictionCoef();
  final float timeInterval = (float) (currentTime - mDecelerationLastTime) / 1000.f;
  mChart.setRotationAngle(mChart.getRotationAngle() + mDecelerationAngularVelocity * timeInterval);
  mDecelerationLastTime = currentTime;
  if (Math.abs(mDecelerationAngularVelocity) >= 0.001)
    Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
  else
    stopDeceleration();
}

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

Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
else {

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

mDecelerationVelocity.y = velocityY;
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by

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

mDecelerationLastTime = AnimationUtils.currentAnimationTimeMillis();
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google

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

public void computeScroll() {
  if (mDecelerationAngularVelocity == 0.f)
    return; // There's no deceleration in progress
  final long currentTime = AnimationUtils.currentAnimationTimeMillis();
  mDecelerationAngularVelocity *= mChart.getDragDecelerationFrictionCoef();
  final float timeInterval = (float) (currentTime - mDecelerationLastTime) / 1000.f;
  mChart.setRotationAngle(mChart.getRotationAngle() + mDecelerationAngularVelocity * timeInterval);
  mDecelerationLastTime = currentTime;
  if (Math.abs(mDecelerationAngularVelocity) >= 0.001)
    Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
  else
    stopDeceleration();
}

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

public void computeScroll() {
  if (mDecelerationAngularVelocity == 0.f)
    return; // There's no deceleration in progress
  final long currentTime = AnimationUtils.currentAnimationTimeMillis();
  mDecelerationAngularVelocity *= mChart.getDragDecelerationFrictionCoef();
  final float timeInterval = (float) (currentTime - mDecelerationLastTime) / 1000.f;
  mChart.setRotationAngle(mChart.getRotationAngle() + mDecelerationAngularVelocity * timeInterval);
  mDecelerationLastTime = currentTime;
  if (Math.abs(mDecelerationAngularVelocity) >= 0.001)
    Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
  else
    stopDeceleration();
}

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

public void computeScroll() {
  if (mDecelerationAngularVelocity == 0.f)
    return; // There's no deceleration in progress
  final long currentTime = AnimationUtils.currentAnimationTimeMillis();
  mDecelerationAngularVelocity *= mChart.getDragDecelerationFrictionCoef();
  final float timeInterval = (float) (currentTime - mDecelerationLastTime) / 1000.f;
  mChart.setRotationAngle(mChart.getRotationAngle() + mDecelerationAngularVelocity * timeInterval);
  mDecelerationLastTime = currentTime;
  if (Math.abs(mDecelerationAngularVelocity) >= 0.001)
    Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
  else
    stopDeceleration();
}

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

public void computeScroll() {
  if (mDecelerationAngularVelocity == 0.f) {
    return; // There's no deceleration in progress
  }
  final long currentTime = AnimationUtils.currentAnimationTimeMillis();
  mDecelerationAngularVelocity *= mChart.getDragDecelerationFrictionCoef();
  final float timeInterval = (float) (currentTime - mDecelerationLastTime) / 1000.f;
  mChart.setRotationAngle(mChart.getRotationAngle() + mDecelerationAngularVelocity * timeInterval);
  mDecelerationLastTime = currentTime;
  if (Math.abs(mDecelerationAngularVelocity) >= 0.001) {
    Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
  } else {
    stopDeceleration();
  }
}

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

Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
} else {

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

Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
else {

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

Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
else {

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

Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google
else {

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

mDecelerationVelocity.y = velocityY;
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by

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

mDecelerationVelocity.y = velocityY;
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by

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

mDecelerationVelocity.y = velocityY;
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by

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

mDecelerationLastTime = AnimationUtils.currentAnimationTimeMillis();
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google

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

mDecelerationLastTime = AnimationUtils.currentAnimationTimeMillis();
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google

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

mDecelerationLastTime = AnimationUtils.currentAnimationTimeMillis();
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google

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

mDecelerationLastTime = AnimationUtils.currentAnimationTimeMillis();
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by Google

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

mDecelerationVelocity.y = velocityY;
Utils.postInvalidateOnAnimation(mChart); // This causes computeScroll to fire, recommended for this by

相关文章