title: Adding a TextWatcher via addTextChangedListener on EditText has no effect
body: <p>I am attempting to attach a TextWatcher to an EditText. This is done in onCreate(). I know that the EditText is being found successfully. However, when the activity launches, nothing happens when making changes in EditText. I have tried editing the code within the three overridden functions in the TextWatcher to do something besides call a function, but that also has no effect</p>
  
  <p>Relevant code:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      if (savedInstanceState == null) {
          getSupportFragmentManager().beginTransaction()
                  .add(R.id.container, new PlaceholderFragment())
                  .commit();
      }
  
      setContentView(R.layout.fragment_main);
      EditText myEditText = (EditText) findViewById(R.id.cost);
      myEditText.addTextChangedListener(new TextWatcher(){
  
          @Override
          public void afterTextChanged(Editable s) {
              updatePrice(null);
          }
  
          @Override
          public void beforeTextChanged(CharSequence s, int start, int count, int after){
          }
  
          @Override
          public void onTextChanged(CharSequence s, int start, int before, int count){
              updatePrice(null);
          }
      });
      setContentView(R.layout.activity_main);
  }
  </code></pre>
  
  <p>And from the layout:</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/cost"
       ... 
      android:inputType="numberDecimal" /&gt;
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity         ComponentInfo{com.example.paymeback/com.example.paymeback.MainActivity}:     java.lang.IllegalArgumentException: No view found for id 0x7f07003c     (com.example.paymeback:id/container) for fragment PlaceholderFragment{b1d7ce60 #0     id=0x7f07003c}
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
          at android.app.ActivityThread.access$800(ActivityThread.java:135)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5017)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
          at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.IllegalArgumentException: No view found for id 0x7f07003c (com.example.paymeback:id/container) for fragment PlaceholderFragment{b1d7ce60 #0 id=0x7f07003c}
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:919)
          at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
  </code></pre>