title: Set new layout in fragment
body: <p>I'm trying to change the layout of a fragment during runtime under a particular condition.</p>
  
  <p>The initial layout in inflated within the onCreateView():</p>
  
  <pre><code>@Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          return inflater.inflate(R.layout.cancel_video, null);
      }
  </code></pre>
  
  <p>Then sometime later within the fragment code I would like to replace the initial layout with some other layout.</p>
  
  <p>I've tried a few things so far; this is the latest that I have:</p>
  
  <pre><code>private void Something(){
      if(checkLicenseStatus(licenseStatus, statusMessage)){
                  View vv = View.inflate(getActivity(), R.layout.play_video, null);
                  //more code
      }
  }
  </code></pre>
  
  <p>How can I accomplish this?</p>