title: onCreateView not called before method of fragment runs
body: <p>Not sure what I'm missing here, but I create a fragment and add it using FragmentManager. Soon after, I run a method from that fragment which is supposed to load information provided (a Tool object) into the layout. </p>
  
  <p>In InfoActivity.java:</p>
  
  <pre><code>public class InfoActivity extends AppCompatActivity{
  
  ...
  
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      mCatIndex = getIntent().getExtras().getInt("catIndex", 0);
      mToolIndex = getIntent().getExtras().getInt("toolIndex", 0);
  
      // If we are in two-pane layout mode, this activity is no longer necessary
      if (getResources().getBoolean(R.bool.has_two_panes)) {
          finish();
          return;
      }
  
      // Place an InfoFragment as our content pane
      InfoFragment f = new InfoFragment();
      getSupportFragmentManager().beginTransaction().add(android.R.id.content, f).commit();
  
      // Display the correct tool info on the fragment
      Tool tool = ToolsSource.getInstance(this).getCategory(mCatIndex).getTool(mToolIndex);
      f.displayTool(tool);
  }
  }
  </code></pre>
  
  <p>However, the layout objects are not initialized because somehow the method is running before the view is created. </p>
  
  <pre><code>package com.anothergamedesigner.listviewtest;
  
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.TextView;
  
  public class InfoFragment extends Fragment {
  
  private TextView mTitle;
  private TextView mSubtitle;
  private TextView mDescription;
  
  //Tool to be displayed
  Tool mTool = null;
  
  //Parameterless constructor needed for framework
  public InfoFragment(){
      super();
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View view = inflater.inflate(R.layout.info_layout, container, false);
  
      mTitle = (TextView) view.findViewById(R.id.title);
      mSubtitle = (TextView) view.findViewById(R.id.subtitle);
      mDescription = (TextView) view.findViewById(R.id.description);
  
      loadView();
      return view;
  }
  
  public void displayTool(Tool t){
      mTool = t;
      loadView();
  }
  
  private void loadView(){
     if(mTool != null) {
         System.out.println(mTitle.getText()); &lt;----- error here so it's for sure the TextView returning null.
         System.out.println(mTool.getTitleTxt());
         mTitle.setText(mTool.getTitleTxt());
         mSubtitle.setText(mTool.getSubtitleTxt());
         mDescription.setText(mTool.getDescriptionTxt());
  
     }
  }
  }
  </code></pre>