Answer the question
In order to leave comments, you need to log in
How to implement infinite addition and subtraction of ProgressBar?
It is necessary to make the value of the progress of the bar increase indefinitely to the maximum (50), and then decrease to the minimum (0). After each increment of the bar value, you need to wait a few milliseconds so that the value of the progress bar smoothly increases and decreases. How is it possible to implement?
Answer the question
In order to leave comments, you need to log in
It is possible through AsyncTask. In it, you start an endless loop, set the desired delay and change the progress as you like. The main thing is to stop it in time so that there is no memory leak due to the fact that the garbage collector cannot utilize your progress bar. It's like an option. But it seems to me that it would be more efficient to do this through animations.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question