title: Navigate from a login activity to the main activity using the Navigation Editor
body: <p>My app has two activities. One is the login activity and this is the activity that is shown when the user starts the app. After successfully signing in, I want to navigate to the main activity.</p>
  
  <p>I have not been able to successfully do this using the navigation editor.</p>
  
  <p>Here is the layout for my login activity:</p>
  
  <p>
  </p>
  
  <pre><code>&lt;fragment
          android:id="@+id/fragment"
          android:name="androidx.navigation.fragment.NavHostFragment"
          android:layout_width="0dp"
          android:layout_height="0dp"
          app:navGraph="@navigation/nav_graph_login"
          app:defaultNavHost="true"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="parent"
          tools:layout_editor_absoluteY="450dp"
          tools:layout_editor_absoluteX="201dp"&gt;
  
  
  &lt;/fragment&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is the navigation graph for the login activity:</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_login"
  /&gt;
  </code></pre>
  
  <p>This is the layout of my main activity:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.drawerlayout.widget.DrawerLayout
          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/drawer_layout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fitsSystemWindows="true"
          tools:openDrawer="start"&gt;
  
      &lt;fragment
              android:id="@+id/fragment"
              android:name="androidx.navigation.fragment.NavHostFragment"
              android:layout_width="0dp"
              android:layout_height="0dp"
              app:navGraph="@navigation/nav_graph_main"
              app:defaultNavHost="true"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toBottomOf="parent"
              tools:layout_editor_absoluteY="450dp"
              tools:layout_editor_absoluteX="201dp"/&gt;
  
  &lt;/androidx.drawerlayout.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>And the navigation graph for the main activity:</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_main"
              app:startDestination="@id/loginActivity"&gt;
  
  &lt;/navigation&gt;
  </code></pre>
  
  <p>I see nothing in the navigation editor where I can connect the login activity to the main activity.</p>