How to increase int value in Java?
Let's say I increase the integer value here from 0 - 100.
public void onProgressChanged(int progress) {
percentageMeasurer(progress);
}
And I read it like to that, to save it afterwards:
int someValue = 0;
public void percentageMeasurer(int currentProgress) {
int someValue = currentProgress);
}
The problem is, onProgressChanged will be excecuted twice, so the value of
someValue will always become 100, I would like to add these two values, so
the sum would be in the end 200, but of course it starts overwrite it the
next time onProgressChanged is excuted.
No comments:
Post a Comment