title: Fragment - cancelling fragment transaction BEFORE fragment is created
body: <p><code>MyFragment</code> has <code>layout_my_fragment.xml</code> which has a WebView widget. <code>MyFragment</code> doesn't inflate the view itself, it uses inheritance:</p>
  <p><code>MyFragment &lt;- ParentFragment &lt;- GrandParentFragment (layout is inflated here)</code></p>
  <p>The goal is to check whether the phone has WebView enabled <strong>BEFORE</strong> inflating its layout (which would crash the app).</p>
  <p>My solution so far:</p>
  <pre><code>override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
      checkWebviewIsEnabled()
  
      return super.onCreateView(inflater, container, savedInstanceState)
  }
  
  override fun checkWebviewIsEnabled(): Boolean {
      if(!isWebviewEnabled(requireActivity())) {
          findNavController().popBackStack()
      }
  
      return true
  }
  </code></pre>
  <p><code>findNavController().popBackStack()</code>, which is the normal way of exiting fragment, gets called but doesn't do anything and the <code>return true</code> is called. I suspect this is because that way only works after the fragment is created.</p>
  <p>So how do I cancel the fragment creation before inflating its layout?</p>