title: Custom "navigate up" behavior for certain fragment using Navigation component
body: <p>I want to add custom <em>up navigation</em> from fragment using Navigation component</p>
  
  <p>In my <code>build.gradle(app)</code> I use <code>androidx.appcompat:appcompat:1.1.0-alpha04</code> dependency to have access to <code>onBackPressedDispatcher</code> from activity.</p>
  
  <p>So I implemented <code>OnBackPressedCallback</code> in my fragment and
  registered callback to dispatcher:</p>
  
  <pre><code>requireActivity().onBackPressedDispatcher.addCallback(this)
  </code></pre>
  
  <p>I expected that pressing <em>navigate up</em> in toolbar will call it, but it doesn't. 
  Pressing device's back button calls it as expected.</p>
  
  <p>Is there a similar way to add some callback in fragment on navigate up action?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>overridden methods <code>onOptionsItemSelected</code> and <code>onSupportNavigateUp</code> doesn't invoked on pressing <em>up button</em> in toolbar</p>