title: Why does action bar toggle on toolbar is not showing
body: <p>I am trying to implement <code>NavigationView</code>. I have a <code>ToolBar</code> on which I want to add <code>ActionBarDrawerToggle</code>. I am not sure why it is not visible.</p>
  
  <h2>DashboardActivity.java</h2>
  
  <pre><code>public class DashboardActivity extends BaseActivity {
  
      private DrawerLayout mDrawerLayout;
  
      private ActionBarDrawerToggle mActionBarDrawerToggle;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          ActivityDashboardBinding activityDashboardBinding = setContentView(this, R.layout.activity_dashboard);
  
          // setting the toolbar title
          setToolbarText(getString(R.string.home_screen_name));
  
          // initializing drawer layout and action bar toggle
          mDrawerLayout = activityDashboardBinding.drawer;
          mActionBarDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.home_screen_open_drawer, R.string.home_screen_close_drawer) {
              @Override
              public void onDrawerClosed(View drawerView) {
                  // Code here will be triggered once the drawer closes as we dont want anything to happen so we leave this blank
                  super.onDrawerClosed(drawerView);
              }
  
              @Override
              public void onDrawerOpened(View drawerView) {
                  // Code here will be triggered once the drawer open as we dont want anything to happen so we leave this blank
  
                  super.onDrawerOpened(drawerView);
              }
          };
  
          //Setting the actionbarToggle to drawer layout
          mDrawerLayout.addDrawerListener(mActionBarDrawerToggle);
  
          //calling sync state is necessay or else your hamburger icon wont show up
          mActionBarDrawerToggle.syncState();
  
      }
  
      protected void onPostCreate(Bundle savedInstanceState) {
          super.onPostCreate(savedInstanceState);
  
          mActionBarDrawerToggle.syncState();
      }
  
  }
  </code></pre>
  
  <h2>activity_dashboard.xml</h2>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;android.support.design.widget.CoordinatorLayout 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="com.icici.iciciappathon.dashboard.DashboardActivity"&gt;
  
          &lt;android.support.v4.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"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fitsSystemWindows="true"
              tools:context=".MainActivity"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:orientation="vertical"&gt;
  
                  &lt;include
                      android:id="@+id/first"
                      layout="@layout/toolbar"
                      android:layout_width="0dp"
                      android:layout_height="0dp"
                      app:layout_constraintHorizontal_bias="0.0"
                      app:layout_constraintLeft_toLeftOf="parent"
                      app:layout_constraintRight_toRightOf="parent"
                      app:layout_constraintTop_toTopOf="parent"
                      tools:layout_constraintLeft_creator="1"
                      tools:layout_constraintRight_creator="1"
                      tools:layout_constraintTop_creator="1" /&gt;
  
                  &lt;include
                      android:id="@+id/content_get_started"
                      layout="@layout/content_get_started" /&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;android.support.design.widget.NavigationView
                  android:id="@+id/navigation_view"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:layout_gravity="start"
                  app:menu="@menu/drawer" /&gt;
  
          &lt;/android.support.v4.widget.DrawerLayout&gt;
  
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <h2>toolbar.xml</h2>
  
  <pre><code>&lt;merge xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimary"
          app:contentInsetEnd="0dp"
          app:contentInsetLeft="0dp"
          app:contentInsetRight="0dp"
          app:contentInsetStart="0dp"
          app:layout_scrollFlags="scroll|enterAlways"
          app:popupTheme="@style/ThemeOverlay.AppCompat.Light"&gt;
  
          &lt;android.support.v7.widget.AppCompatTextView
              android:id="@+id/titleToolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:gravity="center"
              android:textColor="@color/white"
              android:textSize="@dimen/all_toolbar" /&gt;
  
      &lt;/android.support.v7.widget.Toolbar&gt;
  &lt;/merge&gt;
  </code></pre>
  
  <h2>drawer.xml</h2>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;group android:checkableBehavior="single"&gt;
  
          &lt;item
              android:id="@+id/history"
              android:checked="false"
              android:title="@string/login_client_id" /&gt;
  
      &lt;/group&gt;
  &lt;/menu&gt;
  </code></pre>
  
  <h2>BaseActivity.java</h2>
  
  <pre><code>public class BaseActivity extends AppCompatActivity {
  
      private AppCompatTextView mAppCompatTextView;
  
      private ProgressDialog mProgressDialog;
  
      private Toolbar mToolbar;
  
      private String accessToken;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          if (savedInstanceState == null) {
              // register device with firebase
          }
  
          ActionBar actionBar = getSupportActionBar();
          if (actionBar != null) {
              actionBar.setDisplayHomeAsUpEnabled(true);
          }
      }
  
      public &lt;T extends ViewDataBinding&gt; T setContentView(Activity mActivity, int layoutResID) {
          T viewDataBinding = DataBindingUtil.setContentView(mActivity, layoutResID);
          getToolbar();
          return viewDataBinding;
      }
  
      /**
       * Show a progress dialog.
       *
       * @param msg
       */
      protected void showProgress(String msg) {
          if (mProgressDialog != null &amp;&amp; mProgressDialog.isShowing())
              dismissProgress();
  
          mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.app_name), msg);
      }
  
      /**
       * Show progress dialog.
       */
      protected void dismissProgress() {
          if (mProgressDialog != null) {
              mProgressDialog.dismiss();
              mProgressDialog = null;
          }
      }
  
      /**
       * Show a toast.
       *
       * @param msg the text to show
       */
      protected void showToast(String msg) {
          Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
      }
  
      /**
       * Show a alert dialog.
       *
       * @param msg the text to show
       */
      protected void showAlert(String msg) {
          final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.Theme_AppCompat_Light_Dialog_Alert));
          builder.setTitle(getResources().getString(R.string.app_name))
                  .setMessage(msg)
                  .setCancelable(false)
                  .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialogInterface, int i) {
                          dialogInterface.dismiss();
                      }
                  }).create().show();
      }
  
      /**
       * Show a alert dialog to check out bought items.
       *
       * @param msg the text to show
       */
      protected void showAlertAndStartActivity(final Context context, String msg, final Intent intent) {
          final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.Theme_AppCompat_Light_Dialog_Alert));
          builder.setTitle(getResources().getString(R.string.app_name))
                  .setMessage(msg)
                  .setCancelable(false)
                  .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialogInterface, int i) {
  
                          dialogInterface.dismiss();
  
                          // start check out activity for payment
                          startActivity(intent);
                          ((Activity) context).finish();
  
                      }
                  }).create().show();
      }
  
  
      protected Toolbar getToolbar() {
          if (mToolbar == null) {
              mToolbar = (Toolbar) findViewById(R.id.toolbar);
  
              if (mToolbar != null) {
                  setSupportActionBar(mToolbar);
              }
          }
          return mToolbar;
      }
  
      protected void showToolbar() {
          mToolbar.setVisibility(View.VISIBLE);
      }
  
      protected void setToolbarText(String title) {
          AppCompatTextView toolbarTitle = (AppCompatTextView) mToolbar.findViewById(R.id.titleToolbar);
          toolbarTitle.setText(title);
      }
  
      protected void hideToolbar() {
          mToolbar.setVisibility(View.GONE);
      }
  
      protected String getAccessToken() {
          return accessToken;
      }
  
      protected void setAccessToken(String accessToken) {
          this.accessToken = accessToken;
      }
  
      protected boolean isOnline() {
          ConnectivityManager cm = (ConnectivityManager) this.getSystemService(
                  Context.CONNECTIVITY_SERVICE);
          return cm.getActiveNetworkInfo() != null &amp;&amp;
                  cm.getActiveNetworkInfo().isConnectedOrConnecting();
      }
  
  }
  </code></pre>
  
  <h2>styles.xml</h2>
  
  <pre><code>&lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;!-- Customize your theme here. --&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
      &lt;item name="android:buttonStyle"&gt;@style/ICICIAppathonButton&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <h2>AndroidManifest.xml</h2>
  
  <pre><code>&lt;application
      android:name=".AppApplication"
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:theme="@style/AppTheme"&gt;
  </code></pre>