title: How to automatically add commas to large numbers in Android?
body: <p>I have a <code>TextView</code> that holds a number value (which is constantly being updated). Is there a method I can use to automatically add a comma if the number increases?</p>
  <p>This is my current code:</p>
  <pre><code>    String number = textView.getText().toString();
      double amount = Double.parseDouble(number);
      DecimalFormat formatter = new DecimalFormat(&quot;#,###&quot;);
      String formatted = formatter.format(amount);        
      textView.setText(formatted);
  </code></pre>