title: ViewModel onchange gets called multiple times when back from Fragment
body: <p>I am working with Android architecture components. 
  What i want is when user type "0" in Edittext and click on Button to replace Fragment with new one , and if type anything else post Toast error message. In  Problem is when i back from new <code>Fragment(BlankFragment)</code> and click on button again and type "0" again and click, <code>onchange()</code> is called multiple times so  Fragment is get created multiple times</p>
  
  <p>FragmentExample.class:</p>
  
  <pre class="lang-java prettyprint-override"><code>     @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          manager = getActivity().getSupportFragmentManager();
          viewmModel = ViewModelProviders.of(getActivity(), viewModelFactory)
                  .get(VModel.class);
  
          View v = inflater.inflate(R.layout.fragment_list, container, false);   
          b = (Button) v.findViewById(R.id.b);
          et = (EditText) v.findViewById(R.id.et);
  
          viewmModel.observeData().observe(getActivity(), new Observer&lt;String&gt;() {
              @Override
              public void onChanged(@Nullable String s) {
  
                  if(s.equals("0")) {
                      BlankFragment fragment = (BlankFragment) manager.findFragmentByTag(DETAIL_FRAG);
                      if (fragment == null) {
                          fragment = BlankFragment.newInstance();
                      }
                      addFragmentToActivity(manager,
                              fragment,
                              R.id.root_activity_detail,
                              DETAIL_FRAG
                      );
                  } else {
                      Toast.makeText(getContext(), "Wrong text", Toast.LENGTH_SHORT).show();
                  }
              }
          });
  
          b.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  viewmModel.setData(et.getText().toString());
              }
          });
          return v;
      }
      private void addFragmentToActivity(FragmentManager fragmentManager, BlankFragment fragment, int root_activity_detail, String detailFrag) {
          android.support.v4.app.FragmentTransaction transaction = fragmentManager.beginTransaction();
          transaction.replace(root_activity_detail, fragment, detailFrag).addToBackStack(detailFrag);
          transaction.commit();
      }
  </code></pre>
  
  <p>Repository class:</p>
  
  <pre class="lang-java prettyprint-override"><code>
      public class Repository {
      MutableLiveData&lt;String&gt; dataLive = new MutableLiveData&lt;&gt;();  
  
      public Repository() {
  
      }
  
      public void setListData(String data) {
         dataLive.setValue(data);
      }
  
      public MutableLiveData&lt;String&gt; getData() {
          return dataLive;
      }
  }
  </code></pre>
  
  <p>BlankFragment.class:</p>
  
  <pre class="lang-java prettyprint-override"><code>    @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          listItemViewModel = ViewModelProviders.of(this, viewModelFactory)
                  .get(VModel.class);
          listItemViewModel.setData("");
          return inflater.inflate(R.layout.fragment_blank, container, false);
      }
  </code></pre>