title: FragmentManager: moveToState: Fragment state for GridFragment{...} not updated inline; expected state 1 found 0
body: <p>I have a simple Activity and Retained Fragment, just as <a href="http://www.androiddesignpatterns.com/2013/04/retaining-objects-across-config-changes.html" rel="noreferrer">Alex Lockwood blog post example</a>. </p>
  
  <p>My activity goes like this inside <code>onCreate()</code>:</p>
  
  <pre><code>FragmentManager fm = getSupportFragmentManager();
      retainedFragment = (GridFragment) fm.findFragmentByTag(RETAINED_FRAGMENT_TAG);
  
      // If the Fragment is non-null, then it is currently being
      // retained across a configuration change.
      if (retainedFragment == null) {
          retainedFragment = new GridFragment();
          fm.beginTransaction().add(retainedFragment, RETAINED_FRAGMENT_TAG).commit();
      }else{
          list = retainedFragment.getList();
          System.out.println(list.size());//OUTPUT 12
      }
  </code></pre>
  
  <p>And my <code>Fragments</code>' <code>onAttach()</code> is :</p>
  
  <pre><code> @Override
  public void onAttach(Context activity) {
      super.onAttach(activity);
      mCallbacks = (TaskCallbacks) activity;
      System.out.println("here"); //OUTPUT here
  }
  </code></pre>
  
  <p>Now, on every screen rotation I've got very strange output: </p>
  
  <blockquote>
    <p>I/System.out: here</p>
    
    <p>W/FragmentManager: moveToState: Fragment state for
    GridFragment{95fc9db #0 retained_tag} not updated inline; expected
    state 1 found 0 </p>
    
    <p>I/System.out: 12</p>
  </blockquote>
  
  <p>Where is that strange warning comes from right between my inputs? How to deal with it? Thanks in advance!</p>