title: Android Jetpack Navigation How to handle the Toolbar and BottomNavBar content
body: <p>I am a bit confused on how the Navigation component fits in the app behavior. It all looks nice and shiny in tutorials where you don't do things too complex but when implementing in real app, things seem different.</p>
  
  <p><strong>Before Navigation</strong></p>
  
  <p>Before implementing navigation I had to manually run fragment transactions. In order to do this, my fragment would implement an interface <code>onFragmentAction</code> which passed a <code>bundle</code> to the main <code>Activity</code> and in the activity based on the actions, replace the current fragment with another one.</p>
  
  <p>The second part that needs handling is the top toolbar and the <code>BottomAppBar</code>. For instance <code>BottomAppBar</code> needs to have the <code>FAB</code> aligned differently on some fragments or hidden in others. Also the top <code>ToolBar</code> needs to be expanded on some or collapsed on others. To do this, I listened to <code>FragmentManager.OnBackStackChangedListener</code> and based on the fragment tag <code>getSupportFragmentManager().getBackStackEntryAt(size - 1).getName()</code> change the layout accordingly.</p>
  
  <p><strong>With Navigation</strong></p>
  
  <p>The first part seems to be easy to do: pass params and start new fragments. But I have no idea if navigation can handle the toolbars management or I need to keep managing it from my Activity. </p>