yarolegovich / SlidingRootNav

DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.
Apache License 2.0
3.06k stars 455 forks source link

change Burger menu icon #45

Open WahdanZ opened 6 years ago

WahdanZ commented 6 years ago

how to change or add my custom menu Burger menu icon

ozanurkn commented 6 years ago

can anybody help ? i have same problem still

ZaydelEduard commented 6 years ago

the thing that worked for me is that i just needed to call toolbar.setNavigationIcon(R.drawable.ic_toolbar_menu); at the end of onCreate or after SlidingRootNavBuilder(this).(...).inject()

devangichhatbar commented 6 years ago

You just have to put just like below.

slidingRootNav = new SlidingRootNavBuilder(this) .withToolbarMenuToggle(toolbar) .withMenuOpened(false) .withContentClickableWhenMenuOpened(false) .withSavedState(savedInstanceState) .withMenuLayout(R.layout.menu_left_drawer) .inject();

    toolbar.setNavigationIcon(R.drawable.ic_menu);

It works for me.