title: findViewById returns NULL when using Fragment
body: <p>I'm new to Android developing and of course on Fragments.</p>
  
  <p>I want to access the controls of my fragment in main activity but 'findViewById' returns null.
  without fragment the code works fine.</p>
  
  <p>Here's part of my code:</p>
  
  <p>The <strong>fragment</strong>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      tools:ignore="HardcodedText" &gt;
  
      &lt;EditText
          android:id="@+id/txtXML"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:ems="10"
          android:scrollbars="vertical"&gt;
      &lt;/EditText&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>the onCreate of MainActivity:</p>
  
  <pre><code>    @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          super.setContentView(R.layout.main);
  
          this.initialisePaging();
  
          EditText txtXML = (EditText) findViewById(R.id.txtXML);}
  </code></pre>
  
  <p>on this point the <strong>txtXML</strong> is null.</p>
  
  <p>What's Missing in my code or what should I do?</p>