title: How to use the TextWatcher class in Android?
body: <p>Can anyone tell me how to mask the <strong>substring</strong> in <code>EditText</code> or how to change <code>EditText</code> <strong>substring input to password type</strong> or <strong>replace</strong> by another <strong>character</strong> like this 123xxxxxxxxx3455</p>
  
  <pre><code> String contents = et1.getText().toString();
   et1.setText(contents.replace.substring(0, contents.length()-2),"*");
  </code></pre>
  
  <p>Please, tell me how I can use the <code>TextWatcher</code> method in Android.</p>