title: Calling a custom fragment from an activity
body: <p>I creating my own Fragment that I wanna activate from my activity. My mainActivity file is a pure Activity (not a FragmantActivity or anything else). Why I can't use my custom Fragment as a parameter?</p>
  
  <pre><code>if (savedInstanceState == null) {
          // Add the fragment on initial activity setup
          myFragment = new CustomFragment();
          getFragmentManager()
          .beginTransaction()
                  .add(android.R.id.content, myFragment )
                  .commit();
  </code></pre>
  
  <p>I am getting a compile error telling me that the 2nd parameter on .add() method must be a Fragment, but 'myFragment' is a CustomFragment that derives Fragment class. So how to activate this fragment from a normal Activity?</p>