Made the progressbars go from 100 to 0 again

I accidentally reverted 470244b26cbde721ccae61aa7b891747e58c197d
pull/41/head
Impyy 9 years ago
parent 2128b5bf59
commit 9814b09f03

@ -89,8 +89,8 @@ public class KeyProfileAdapter extends RecyclerView.Adapter<KeyProfileAdapter.Ke
long millisTillRotation = keyProfile.Info.getMillisTillNextRotation();
long period = keyProfile.Info.getPeriod() * 1000;
int currentProgress = (int)((((double)period - millisTillRotation) / period) * 1000);
ObjectAnimator animation = ObjectAnimator.ofInt(progressBar, "progress", currentProgress, 1000);
int currentProgress = 1000 - (int)((((double)period - millisTillRotation) / period) * 1000);
ObjectAnimator animation = ObjectAnimator.ofInt(progressBar, "progress", currentProgress, 0);
animation.setDuration(millisTillRotation);
animation.setInterpolator(new LinearInterpolator());
animation.start();

Loading…
Cancel
Save