title: Replace duplicate code of TextWatchers
body: <p>I have a Sign Up screen with bunch of <code>EditTexts</code> and each one has a <code>TextWatcher</code> so I can "listen" for changes and show or hide errors.</p>
  
  <p>For example :</p>
  
  <pre><code> etFirstName.addTextChangedListener(new TextWatcher() {
          @Override
          public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
  
          }
  
          @Override
          public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
  
          }
  
          @Override
          public void afterTextChanged(Editable editable) {
              if (etFirstName.getText().length() &gt; 0) {
                  hideFirstNameError();
              }
          }
      });
  </code></pre>
  
  <p>The problem is that the code is too bloated with all this code being repeated again and again for each one of my <code>editTexts</code>.</p>
  
  <p>So I was just wondering if there is a cleaner way to write it ? Tried to replace with a custom class that extends <code>TextWatcher</code>  but then I need to pass as variables to the constructor the <code>EditText</code>s and I'm not so sure if this is a good practice : passing to other classes than your <code>Activities</code> components that have to do with android ? </p>