-4

I am using four ProgressBars in my AndroidApp. First of all I want them all to be empty, and when I update a Variable, I want one of the ProgressBars to get filled a bit. But only up to a "goal" that I want to set in beforehand. For example as soon as the Variable hits 1000, the ProgressBar should be filled and a message should pop up or something like that, when the variable is 500, it should be halfway filled and so on.

These are my problems, I think they might all be solved by knowing how to bind a ProgressBar to a variable? If so, please tell me how I can achieve that, else, please tell me how I can still get my plan done. THANK YOU!

Julian
  • 19
  • 1
  • 8

1 Answers1

1

You can set the progress bar max value to 1000 and then rather than set the variable to 500, set the progress value to 500.

Here an example of binding the progress bar is: Can i databind a ProgressBar in Android?

Community
  • 1
  • 1
mWhitley
  • 453
  • 7
  • 14