title: How to start a fragment from another activity
body: <p>I want to start a fragment from B activity but the fragment is in main activity. If I use FragmentTransaction, but it gives error "No view found for ID for fragment"</p>
  
  <p>Code</p>
  
  <pre><code>FragmentManager fm = getSupportFragmentManager();
  FragmentTransaction ft = fm.beginTransaction();
  ft.replace(R.id.layoutContent, frag);
  ft.commit();
  </code></pre>
  
  <p>Error</p>
  
  <blockquote>
    <p>No view found for id 0x7f0e00be (com.company.app:id/layoutContent) for fragment PlaylistFrag{5764566 #0 id=0x7f0e00be}</p>
  </blockquote>