title: onTextChanged() not working properly in an EditText
body: <blockquote>
    <p>My purpose is that initial my edittext view as 0.00.
    After enter one number ex-2  so then edit text should show as - 0.02
    Then I enter second one ex- 3 edit text should show - 0.23
    After the next number ex -5 edit text should show - 2.35
     for this scenario I have implemented small code.But that is not working as expected . Edittext does not update.</p>
  </blockquote>
  
  <pre><code>    public class MainActivity extends Activity {
  
      private EditText text;
      Character[] amount;
      int counter=0;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          text = (EditText)findViewById(R.id.text);
          text.setSelection(text.getText().length());
          amount =toCharacterArray(text.getText().toString());
  
          text.addTextChangedListener(new TextWatcher() {
              @Override
              public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
              }
  
              @Override
              public void onTextChanged(CharSequence s, int start, int before, int count) {
                  System.out.println("test "+s);
                  if(s.length()&gt;0)
                  {
  
                      if(counter==0 &amp;&amp; s.length()&gt;=5)
                      {
                          Log.e("Edit counter 1",String.valueOf(s) );
                          amount[3]=s.charAt(4);
                      }
                      else if (counter==1&amp;&amp; s.length()&gt;=5)
                      {
                          Log.e("Edit counter 2",String.valueOf(s) );
                          amount[2]=amount[3];
                          amount[3]=s.charAt(4);
                      }
                      else if (counter==2 &amp;&amp; s.length()&gt;=5)
                      {
                          amount[0]=amount[2];
                          amount[2]=amount[3];
                          amount[3]=s.charAt(4);
                      }
                      else
                      {
  
                      }
  
  
                      String str = "";
  
                      for (Character c : amount)
                          str += c.toString();
  
                      System.out.println("Edit test "+str);
  
  
                     text.setText(str);
  
                  }
                  counter++;
  
              }
  
              @Override
              public void afterTextChanged(Editable s) {
                  System.out.println(s.toString());
  
  
              }
  
          });
      }
      public Character[] toCharacterArray( String s ) {
  
          if ( s == null ) {
              return null;
          }
  
          int len = s.length();
          Character[] array = new Character[len];
          for (int i = 0; i &lt; len ; i++) {
              array[i] = new Character(s.charAt(i));
          }
  
          return array;
      }
  }
  </code></pre>