From 349b8e2a080b046428000dcf78f42303becf0ada Mon Sep 17 00:00:00 2001 From: shota-saito Date: Tue, 1 Aug 2017 16:45:20 +0900 Subject: [PATCH] re commit --- .../clockanimationview/ClockDrawable.java | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/clockanimation/src/main/java/jp/shts/android/library/clockanimationview/ClockDrawable.java b/clockanimation/src/main/java/jp/shts/android/library/clockanimationview/ClockDrawable.java index 3e27eab..314c905 100644 --- a/clockanimation/src/main/java/jp/shts/android/library/clockanimationview/ClockDrawable.java +++ b/clockanimation/src/main/java/jp/shts/android/library/clockanimationview/ClockDrawable.java @@ -139,27 +139,28 @@ public void start() { minuteAnimator.start(); } - void setTime(ClockTime newTime) { - long minutesDifference = getMinutesDifference(previousTime, newTime); - // 60min ... 360grade - // minDif .. minDelta - float minDeltaRotation = ((float) minutesDifference * 360f) / 60f; - // 720min ... 360grade = 12h ... 360grade - // minDif ... hourDelta - float hourDeltaRotation = ((float) minutesDifference * 360f) / 720f; - - remainingMinRotation += minDeltaRotation; - remainingHourRotation += hourDeltaRotation; - - targetHourRotation = currentHourRotation + remainingHourRotation; - targetMinRotation = currentMinRotation + remainingMinRotation; - - start(); - - previousTime = newTime; - - invalidateSelf(); - } + // TODO: +// void setTime(ClockTime newTime) { +// long minutesDifference = getMinutesDifference(previousTime, newTime); +// // 60min ... 360grade +// // minDif .. minDelta +// float minDeltaRotation = ((float) minutesDifference * 360f) / 60f; +// // 720min ... 360grade = 12h ... 360grade +// // minDif ... hourDelta +// float hourDeltaRotation = ((float) minutesDifference * 360f) / 720f; +// +// remainingMinRotation += minDeltaRotation; +// remainingHourRotation += hourDeltaRotation; +// +// targetHourRotation = currentHourRotation + remainingHourRotation; +// targetMinRotation = currentMinRotation + remainingMinRotation; +// +// start(); +// +// previousTime = newTime; +// +// invalidateSelf(); +// } void animate(ClockTime newTime) { long minutesDifference = getMinutesDifference(previousTime, newTime);