title: changing the default drawer icon (Hamburger)
body: <p>I want to change the default icon which opens the drawer. Is there a way that I can do it? I searched in question and I couldn't solve it. Here is my Navigation Drawer class which I instanciate from it in other classes where I need fragment.</p>
  
  <pre><code>public class navigation_drawer extends Fragment {
  
  public static final String PREF_FILE_NAME = "testpref";
  public static final String KEY_USER_LEARNED_DRAWER = "user_learned_drawer";
  
  private ActionBarDrawerToggle drawer_toggle;
  private DrawerLayout my_drawer_layout;
  
  private View container_view;
  
  private boolean m_userLearnedDrawer;
  private boolean m_fromSavedInstanceState;
  
  public navigation_drawer() {
      // Required empty public constructor
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      m_userLearnedDrawer = Boolean.valueOf(
              readFromPreferences( getActivity() , KEY_USER_LEARNED_DRAWER , "false" )
      );
  
      if( savedInstanceState != null )
      {
          m_fromSavedInstanceState = true;
      }
  
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      return inflater.inflate(R.layout.fragment_navigation_drawer, container, false);
  }
  
  public void setUp( int fragmentId , DrawerLayout dl , final Toolbar toolbar )
  {
  
      container_view = getActivity().findViewById( fragmentId );
      my_drawer_layout = dl;
      drawer_toggle = new ActionBarDrawerToggle( getActivity() , dl , toolbar ,
              R.string.drawer_open , R.string.drawer_close) {
  
          @Override
          public void onDrawerOpened(View drawerView)
          {
              super.onDrawerOpened(drawerView);
              if( ! m_userLearnedDrawer )
              {
                  m_userLearnedDrawer = true;
                  saveToPreferences( getActivity() , PREF_FILE_NAME ,
                          m_userLearnedDrawer + "" );
              }
  
              getActivity().invalidateOptionsMenu();
          }
  
          @Override
          public void onDrawerClosed(View drawerView)
          {
              super.onDrawerClosed(drawerView);
              getActivity().invalidateOptionsMenu();
          }
  
          @Override
          public boolean onOptionsItemSelected(MenuItem item) {
              if (item !=null &amp;&amp; item.getItemId() == android.R.id.home)
              {
                  if (my_drawer_layout.isDrawerOpen(Gravity.RIGHT))
                  {
                      my_drawer_layout.closeDrawer(Gravity.RIGHT);
                  }
                  else
                  {
                      my_drawer_layout.openDrawer(Gravity.RIGHT);
                  }
                  return true;
              }
              return false;
          }
  
          @Override
          public void onDrawerSlide(View drawerView, float slideOffset)
          {
              if( slideOffset &lt; 0.1 ) {
                  toolbar.setAlpha(1 - slideOffset);
              }
          }
      };
  
      /*
      if( !m_userLearnedDrawer &amp;&amp; !m_fromSavedInstanceState )
      {
          my_drawer_layout.openDrawer( container_view );
      }
      */
  
      my_drawer_layout.setDrawerListener( drawer_toggle );
  
      my_drawer_layout.post(
              new Runnable() {
                  @Override
                  public void run() {
                      drawer_toggle.syncState();
                  }
              }
      );
  }
  
  public static void saveToPreferences( Context con , String preferenceName , String preferenceValue)
  {
      SharedPreferences sp = con.getSharedPreferences( PREF_FILE_NAME , Context.MODE_PRIVATE );
      SharedPreferences.Editor editor = sp.edit();
      editor.putString( preferenceName , preferenceValue );
      editor.apply();
  }
  
  public static String readFromPreferences( Context con , String preferenceName , String preferenceValue)
  {
      SharedPreferences sp = con.getSharedPreferences( PREF_FILE_NAME , Context.MODE_PRIVATE );
      return sp.getString( preferenceName , preferenceValue );
  }
  }
  </code></pre>
  
  <p>But when I put this code <code>toolbar.setNavigationIcon(R.drawable.picture);
  </code> inside onDrawerOpened it shows the default Hamburger icon but when I slide or Click on icon it changes to my picture and it replaces the default icon. 
  And here is the class where I instanciate the navigation drawer class.</p>
  
  <pre><code>public class welcome extends ActionBarActivity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_welcome);
  
      getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
  
      my_toolbar = (Toolbar) findViewById(R.id.app_bar);
      setSupportActionBar(my_toolbar);
  
      getSupportActionBar().setDisplayShowHomeEnabled(true);
  
      navigation_drawer myNav = (navigation_drawer) getSupportFragmentManager().findFragmentById(R.id.fragment_navigation_drawer);
  
      myNav.setUp(R.id.fragment_navigation_drawer, (DrawerLayout) findViewById(R.id.welcome_layout), my_toolbar);
  
  }
  </code></pre>