Remove Android Toolbar Navigation Drawer option

后端 未结 6 2040
一整个雨季
一整个雨季 2021-01-02 21:07

How can i remove the leftmost navigation drawer menu item on the Android Toolbar. Basically i wan\'t to contain 4 images in a horizontal fashion, Nothing else !

6条回答
  •  [愿得一人]
    2021-01-02 21:37

    My solution:

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.ACCEPT, R.string.CANCEL);
    drawer.setDrawerListener(toggle);
    toggle.syncState();
    toggle.setDrawerIndicatorEnabled(false);
    

提交回复
热议问题