Made the progressbars go from 100 to 0 again

I accidentally reverted 470244b26cbde721ccae61aa7b891747e58c197d
This commit is contained in:
Impyy 2016-09-29 18:47:21 +02:00
parent 2128b5bf59
commit 9814b09f03

View file

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