Android Toolbar Navigation Drawer Icon. But if you are not using any toolbar and you wish to change this icon then you need to follow a procedure and you can easily successfully replace the navigation icon. My requirement is kind of the picture below My navigation drawer should be opened from the right side.
Modal navigation drawers are always opened by an affordance outside of the drawer such as a navigation menu icon in a top app bar. Toolbar toolbar findViewByIdRidtoolbar. Android Sidebar Navigation Drawer with Icons.
Add an ActionBarDrawerToggle which displays the hamburger icon in the toolbar.
DrawerLayout drawer findViewByIdRiddrawer_layout. Val drawer findViewById Riddrawer. Create a new drawer variable for the DrawerLayout we added in XML. Assign a good name to your project.