title: Back arrow is not converting to hamburger icon
body: <p>I am using Android Studio 3.1.4 with <code>Kotlin</code>. I created a new project choosing <code>NavigationDrawer</code> template. I added two fragments <code>MainFragment</code> and <code>SecondFragment</code> to <code>Mainactivity</code>. When <code>activity</code> is started, <code>MainFragment</code> is shown, then I called <code>SecondFragment</code> by clicking Camera item from <code>NavigationDrawer</code>. When I pressed back button, It goes to MainFragment but ActionBar still showing Back Arrow instead of hamburger.
  Previously I worked on a project with <code>android.support.v4.widget.DrawerLayout</code> and all things were working fine.</p>
  
  <p>Below is my <code>MainActiviy</code> Code:</p>
  
  <pre><code>import android.os.Bundle
  import android.support.design.widget.NavigationView
  import android.support.v4.view.GravityCompat
  import android.support.v7.app.ActionBarDrawerToggle
  import android.support.v7.app.AppCompatActivity
  import android.view.Menu
  import android.view.MenuItem
  import kotlinx.android.synthetic.main.activity_main.*
  import kotlinx.android.synthetic.main.app_bar_main.*
  
  
  class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
          setSupportActionBar(toolbar)
  
          showMainFragment()
  
          val toggle = ActionBarDrawerToggle(this, drawer_layout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close)
          drawer_layout.addDrawerListener(toggle)
          toggle.syncState()
          nav_view.setNavigationItemSelectedListener(this)
      }
  
  
      override fun onBackPressed() {
          if (drawer_layout.isDrawerOpen(GravityCompat.START)) {
              drawer_layout.closeDrawer(GravityCompat.START)
          } else if (supportFragmentManager.backStackEntryCount &gt; 0) {
              supportFragmentManager.popBackStack()
          } else {
              super.onBackPressed()
          }
      }
  
      override fun onCreateOptionsMenu(menu: Menu): Boolean {
          // Inflate the menu; this adds items to the action bar if it is present.
          menuInflater.inflate(R.menu.main, menu)
          return true
      }
  
      override fun onOptionsItemSelected(item: MenuItem): Boolean {
  
      val itemId = item.itemId
          if (itemId == android.R.id.home) {
              onBackPressed()
          }
  
          when (item.itemId) {
              R.id.action_settings -&gt; return true
              else -&gt; return super.onOptionsItemSelected(item)
          }
      }
  
      override fun onNavigationItemSelected(item: MenuItem): Boolean {
          // Handle navigation view item clicks here.
          when (item.itemId) {
              R.id.nav_camera -&gt; {
                  // Handle the camera action
                  val fragment = SecondFragment()
                  val fragmentTransaction = supportFragmentManager.beginTransaction()
                  fragmentTransaction.replace(R.id.fragment_container, fragment, "OK")
                  fragmentTransaction.addToBackStack(null)
                  fragmentTransaction.commit()
              }
              R.id.nav_gallery -&gt; {
  
              }
              R.id.nav_slideshow -&gt; {
  
              }
              R.id.nav_manage -&gt; {
  
              }
              R.id.nav_share -&gt; {
  
              }
              R.id.nav_send -&gt; {
  
              }
          }
  
          drawer_layout.closeDrawer(GravityCompat.START)
          return true
      }
  
  
      private fun showMainFragment(){
          val fragment = MainFragment()
          val fragmentTransaction = supportFragmentManager.beginTransaction()
          fragmentTransaction.replace(R.id.fragment_container, fragment)        
          fragmentTransaction.commit()
      }
  }
  </code></pre>
  
  <p><code>MainFragment</code> Code:</p>
  
  <pre><code>import android.os.Bundle
  import android.support.v4.app.Fragment
  import android.view.LayoutInflater
  import android.view.View
  import android.view.ViewGroup
  import android.support.v7.app.AppCompatActivity
  import kotlinx.android.synthetic.main.app_bar_main.*
  
  
  // TODO: Rename parameter arguments, choose names that match
  // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
  private const val ARG_PARAM1 = "param1"
  private const val ARG_PARAM2 = "param2"
  
  /**
   * A simple [Fragment] subclass.
   *
   */
  class MainFragment : Fragment() {
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          // Inflate the layout for this fragment
          var view : View = inflater.inflate(R.layout.fragment_main, container, false)
  
  
          return view
      }
  </code></pre>
  
  <p><code>SecondFragment</code> Code:</p>
  
  <pre><code>import android.os.Bundle
  import android.support.v4.app.Fragment
  import android.support.v7.app.AppCompatActivity
  import android.view.LayoutInflater
  import android.view.View
  import android.view.ViewGroup
  
  // TODO: Rename parameter arguments, choose names that match
  // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
  private const val ARG_PARAM1 = "param1"
  private const val ARG_PARAM2 = "param2"
  
  class SecondFragment : Fragment() {
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          // Inflate the layout for this fragment
          val view : View = inflater!!.inflate(R.layout.fragment_surah, container, false)
  
          (activity as AppCompatActivity).supportActionBar!!.setDisplayHomeAsUpEnabled(true)
          val toolbar = activity!!.findViewById&lt;android.support.v7.widget.Toolbar&gt;(R.id.toolbar)
          (activity as AppCompatActivity).setSupportActionBar(toolbar)
          toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material)
  
          return view
      }
  
  }
  </code></pre>