title: Android Fragment is not displayed
body: <p>I'm quite new to Android dev and I followed the official Android's "Get started".</p>
  
  <p>The fact is, my fragment is not displayed on the main activity ( it worked well few days ago but I changed some lines, I don't remember which ones ). I think it's a very basic problem as I don't use sophisticated fragments : it's basically one fragment inside an activity.</p>
  
  <p>This is my activity :</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/container1"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="com.example.mysecond.MainActivity"
  tools:ignore="MergeRootFrame" /&gt;
  </code></pre>
  
  <p>My fragment :</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/hello_world" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And the java code for this activity (I have some other activities in the app, based on the same pattern "one fragment inside one activity" and they work well...)</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          if (savedInstanceState == null) {
              getSupportFragmentManager().beginTransaction()
                      .add(R.id.container1, new PlaceholderFragment()).commit();
          }
      }
  
  /**
       * A placeholder fragment containing a simple view.
       */
      public static class PlaceholderFragment extends Fragment {
  
          public PlaceholderFragment() {
          }
  
          @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                  Bundle savedInstanceState) {
              View rootView = inflater.inflate(R.layout.fragment_main, container,
                      false);
  
              return rootView;
          }
      }
  }
  </code></pre>
  
  <p>Any ideas ?
  Thank you :)</p>
  
  <p><strong>[edit]</strong>
  so this is my new onCreate method : </p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      getSupportFragmentManager().beginTransaction().replace(
              R.id.container1, new PlaceholderFragment()).commit();
  
  }
  </code></pre>
  
  <p>Still not working for this activity (If I add a button in activity_main.xml I'll be able to see it but the I'm not able to see the TextView in the fragment...)</p>
  
  <p>No errors in logcat and yes the activity is launched (I added some Log.e in onCreate and onCreateView and I cas see them)</p>