When you click on a button, a number is generated and recorded in a textView. When the number becomes too large, let's say 2,000,000,000, he puts a minus sign in front of him and the number is constantly subtracted. Those. now also generates a number, but does not add, but subtract. What is the problem?
Button code
case R.id.s70000x100000: watchCount = watchCount + r.nextInt(20000000) + 30000000; watchUsers.setText("Просмотров на канале - " + watchCount); dialogContract.cancel(); break;
Here it is shown how it changes the sign for a minus and simply subtracts the large accumulated number and the generated number.
long
- Silento