本文整理了Java中com.github.mikephil.charting.utils.Utils.postInvalidateOnAnimation()
方法的一些代码示例,展示了Utils.postInvalidateOnAnimation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.postInvalidateOnAnimation()
方法的具体详情如下:
包路径:com.github.mikephil.charting.utils.Utils
类名称: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
内容来源于网络,如有侵权,请联系作者删除!