Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //make a private field to hold the new values
- private ArrayList<Integer> holdValues = new ArrayList<Integer>();
- // then in your createNewAddButton() method add:
- holdValues.add(1);
- //and in you NewAddButton OnClickListener add :
- int tmp = v.getId();
- plusNew((tmp - 1001));
- EditText temp = (EditText) findViewById(1 + (tmp - 1001));
- temp.setText("" + currentValueNew);
- //modify the plusNew() method:
- public void plusNew(int i) {
- int temporary = holdValues.get(i);
- if (temporary <= 999) {
- temporary = temporary + 1;
- holdValues.setValue(i, temporary);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment