title: EditText, TextWatcher help, Keep on getting previous string
body: <p>I've implemented a view where EditText adds and removes according to the buttons pressed. I also have used TextWatcher to change the numbers into money format. Everything works fine until here.</p>
  
  <p>My problem is when user inputs to first EditText and presses add button. Then when user inputs to the 2nd EditText the input concats with the first EditText string and shows up in the 2nd EditText and also first EditText gets concatenated as well. So basically both EditTexts end up with same string.
  Here's my code:</p>
  
  <pre><code>    amount = new EditText(this);
      RelativeLayout.LayoutParams etLParams = new RelativeLayout.LayoutParams(
              400, LayoutParams.WRAP_CONTENT);
      etLParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
      amount.setInputType(InputType.TYPE_CLASS_NUMBER);
      amount.setLayoutParams(etLParams);
      amount.setId(AMOUNT);
      amount.setSingleLine();
      amount.requestFocus();
      amount.setCursorVisible(true);
      amount.setGravity(Gravity.RIGHT);
      amount.addTextChangedListener(new TextWatcher(){
          String price="";
          private EditText newAmount = new EditText(DutchPayActivity.this);
          public void afterTextChanged(Editable s) {
              // TODO Auto-generated method stub
              if(!s.toString().equals(price)){
                  String cleanString = s.toString().replaceAll("[$,.]", "");
                  long parsed = Long.parseLong(cleanString);
                  NumberFormat nf = NumberFormat.getInstance();
                  price = nf.format(parsed);
                  s.append(price); //gave me error:java.lang.NumberFormatException: 66666666666666666666666666666666
  
                  newAmount.setText(price); //same result as before..
                  newAmount.setSelection(price.length());
              }
          }
          public void beforeTextChanged(CharSequence s, int start, int count,
                  int after) {
              // TODO Auto-generated method stub
  
          }
          public void onTextChanged(CharSequence s, int start, int before,
                  int count) {
              // TODO Auto-generated method stub
  
          }
      });
  </code></pre>
  
  <p>I've tried onTextChanged() and implemented my custom class and so on, but just can't get it to work.</p>