Answer the question
In order to leave comments, you need to log in
How to make a circle countdown timer?
I tried to do something like this:
new CountDownTimer(11000, 1000) {
@SuppressLint("SetTextI18n")
public void onTick(long l) {
donutProgress.setProgress(l/1000);
text.setText(String.valueOf(l / 1000));
public void onFinish() {
text.setText("Готово");
}.start();
Answer the question
In order to leave comments, you need to log in
You can use PropertyAnimation, changing the progress not immediately, but gradually for the widget.
For example, you need progress 30 - ObjectAnimator.ofInt(widget, "progress", 0..30).setDuration(100l).start()
If you want it yourself, Paint has a drawArc method. If you remember school geometry, you can write it in a couple of minutes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question