title: Jetpack navigation: Title and back/up arrow in the action bar?
body: <p>I have installed the latest canary version of Android Studio, and followed this (<a href="https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing" rel="noreferrer">https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing</a>) instruction to implement a simple two page navigation. Basically page1 has a button, and when it is clicked, the app shows page2.</p>
  
  <p>It works, but there is one problem... It does not seem to do anything with the action bar automatically. Is it supposed to show up/back arrow and the "Label" attribute on the action bar automatically by the navigation library? Or am I supposed to do all the work manually as before? I want to show the back arrow and "Details" on action(tool) bar when page2 is showing.</p>
  
  <p>On button click at page 1.</p>
  
  <pre><code>override fun onViewCreated(view: View, savedInstanceState: Bundle?)
  {
      button1.setOnClickListener {
          val nav = NavHostFragment.findNavController(this);
          nav.navigate(R.id.show_page2)
      }
  }
  </code></pre>
  
  <p>Main activity XML. By default it was the default Action Bar, I have replaced it with a ToolBar. There was no difference.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity"&gt;
  
      &lt;androidx.appcompat.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_height="?attr/actionBarSize"
          android:elevation="4dp"
          android:background="?attr/colorPrimary"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
          app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
          android:layout_width="match_parent"&gt;
      &lt;/androidx.appcompat.widget.Toolbar&gt;
  
      &lt;fragment
          android:id="@+id/my_nav_host_fragment"
          android:name="androidx.navigation.fragment.NavHostFragment"
          android:layout_width="0dp"
          android:layout_height="0dp"
          app:defaultNavHost="true"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@+id/toolbar"
          app:navGraph="@navigation/nav_graph"/&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>Nav graph XML.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;navigation xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              xmlns:tools="http://schemas.android.com/tools"
              android:id="@+id/nav_graph"
              app:startDestination="@id/page1"&gt;
  
      &lt;activity
          android:id="@+id/mainActivity2"
          android:name="com.android.navtest.MainActivity"
          android:label="activity_main"
          tools:layout="@layout/activity_main"/&gt;
      &lt;fragment
          android:id="@+id/page1"
          android:name="com.android.navtest.BlankFragment2"
          android:label="Home page"
          tools:layout="@layout/page1"&gt;
          &lt;action
              android:id="@+id/show_page2"
              app:destination="@id/page2"
              app:enterAnim="@anim/anim1"
              app:popExitAnim="@anim/anim2"/&gt;
      &lt;/fragment&gt;
      &lt;fragment
          android:id="@+id/page2"
          android:name="com.android.navtest.BlankFragment"
          android:label="Details"
          tools:layout="@layout/page2"/&gt;
  &lt;/navigation&gt;
  </code></pre>