title: Android - Add navigation drawer to multiple activities
body: <p>I'm new to Android / Kotlin and I have an application with multiple activities.
  So far I have created all the activities needed and the app works fine except for the fact now I need to add a Navigation Drawer.</p>
  
  <p>Coming from iOS, I designed all my layouts thinking I can add the Navigation Drawer after:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.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"
      android:background="@color/backgroundColor"
      android:backgroundTint="@color/backgroundColor"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/mainRelativeLayout"
          android:layout_width="match_parent"
          android:layout_height="44dp"
          android:background="@drawable/navbar_border"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
          &lt;ImageView
              android:id="@+id/ivNavBarLogo"
              android:layout_width="102dp"
              android:layout_height="24dp"
              android:layout_centerHorizontal="true"
              android:layout_centerVertical="true"
              android:contentDescription="@string/empty_description"
              app:srcCompat="@mipmap/navbar_logo"/&gt;
  
          &lt;ImageButton
              android:id="@+id/btnSideMenu"
              android:layout_width="25dp"
              android:layout_height="15dp"
              android:layout_centerVertical="true"
              android:layout_marginStart="15dp"
              android:background="@mipmap/sidemenu_button"
              android:contentDescription="@string/empty_description"
              app:srcCompat="@mipmap/sidemenu_button"/&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;!-- STUFF TO BE ADDED THERE --&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>My intention was to create a NavigationDrawer activity and call it when tapping the btnSideMenu on each activity.</p>
  
  <p>However, I've been trying to get around this for a few days now without any luck. I never thought such a basic feature could be so hard to implement. I tried almost every suggestion and example found here, and also this: <a href="https://developer.android.com/training/implementing-navigation/nav-drawer.html" rel="nofollow noreferrer">https://developer.android.com/training/implementing-navigation/nav-drawer.html</a> </p>
  
  <p>Am I thinking this issue the wrong way? Is there any way of doing this without having to recreate all my activities based on the template provided by Android Studio or using fragments?</p>
  
  <p>LE: Forgot to mention that I removed the ActionBar from all activities.</p>