title: TextWatcher caused crash
body: <p>Here's a newbie to Android Developing.</p>
  
  <p>While I'm making an app that calculate the calories burnt from exercise, I found that adding a TextWatcher to the EditText will cause crashing even I only add it on the "etEnergy".</p>
  
  <p>I've searched many questions about crashed, but most of them are making a infinity loop in the listener and solved by remove the listener then add it back later. I added that but it doesn't work.</p>
  
  <p>I found this message in Logcat when I can't find the log I made in the method: </p>
  
  <p>Warning ActivityManager(744): Activity pause timeout for ActivityRecord{41ea1128 u0 [package name]/.MainActivity t65 f}</p>
  
  <p>The following are the problem codes in MainActivity.java. Without them I can execute correctly but I need them to complete this app.</p>
  
  <pre><code>protected EditText etEnergy,etWeight,etTime;
  protected TextView tvCals;
  //double t,a; //don't make any sense in following code.
  myTextWatch tw;
  
  class myTextWatch implements 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) {
          etEnergy.removeTextChangedListener(this);
          etWeight.removeTextChangedListener(this);
          etTime.removeTextChangedListener(this);
          Log.d("TextWatcher","TextChangedListenerRemoved");
          etEnergy.addTextChangedListener(this);
          etWeight.addTextChangedListener(this);
          etTime.addTextChangedListener(this);
  
      }
  
      @Override
      public void afterTextChanged(Editable s) {
  
      }
  }//end of class myTextWatch
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      etEnergy=(EditText) findViewById(R.id.etEnergy);
      etWeight=(EditText) findViewById(R.id.etWeight);
      etTime=(EditText) findViewById(R.id.etTime);
      etEnergy.addTextChangedListener(tw);
      etWeight.addTextChangedListener(tw);
      etTime.addTextChangedListener(tw);
      tvCals=(TextView) findViewById(R.id.tvCals);
  }
  </code></pre>
  
  <p>Almost forgot to say that I'm using Android Studio 1.1.0 and app will be run on a physical device which is a HTC Butterfly that the Android version is 4.4.2 and the minimum API Level of the app is 14(IceCreamSandwich/4.0).</p>
  
  <p>English is not my native language but I'll try hard to read any reply.</p>
  
  <p>Thanks for your reading.
  Also appreciates for your answering!</p>