title: Conflict with EditText: Watcher to the View + Observer to the MutableLiveData
body: <p>I am having trouble understanding how the <strong>Fragment + ViewModel</strong> paradigm works with a View like an <strong>EditText</strong>.</p>
  
  <p>It being an EditText, it's gonna obviously be modified within the View (Fragment). But I also want to be able to modify it within the ViewModel: e.g. to erase its text.</p>
  
  <p>Here's the code in the Fragment class:</p>
  
  <pre><code>public void onActivityCreated(@Nullable Bundle savedInstanceState) {
  ...
          comment = mViewModel.getComment();
          comment.observe(getViewLifecycleOwner(), new Observer&lt;String&gt;() {
              @Override
              public void onChanged(String s) {
                  commentView.setText(s);
              }
          });
  ...
          commentView.addTextChangedListener(new TextWatcher() {
              @Override
              public void afterTextChanged(Editable s) {
                  mViewModel.setComment(String.valueOf(s));
              }
              @Override
              public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
  
              @Override
              public void onTextChanged(CharSequence s, int start, int before, int count) { }
          });
  </code></pre>
  
  <p>As you can see, I set an <strong>observer</strong> so when I change the value of the MutableLiveData, the View changes. And I set a <strong>watcher</strong> so when I (when using the App) change the value of the View, the MutableLiveData changes.</p>
  
  <p>Here's the code of the ModelView class:</p>
  
  <pre><code>public void addRegister() {
  ...
  String comment = this.comment.getValue();
  ...
  this.comment.setValue("");
  </code></pre>
  
  <p>When I run the App no error pops up, but it hangs. I guess because of an infinite loop.
  How should I approach EditTexts with this View + ViewModel paradigm? What am I not understanding?</p>
  
  <p>Thanks a lot in advance!</p>