I just reused his code. After you added the ActionBarDrawerToggle and called syncState() on it
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
ActionBarDrawerToggle actionBarDrawerToggle = new ActionBarDrawerToggle(...);
//Setting the actionbarToggle to drawer layout
drawerLayout.setDrawerListener(actionBarDrawerToggle);
//calling sync state is necessay or else your hamburger icon wont show up
actionBarDrawerToggle.syncState();
you can iterate through children of the toolbar and then ...
for (int i = 0; i < toolbar.getChildCount(); i++) {
if(toolbar.getChildAt(i) instanceof ImageButton) {
ImageButton imageButton = (ImageButton) toolbar.getChildAt(i);
imageButton.setPadding(50, 100, 50, 50);
}
}
Probably too late, but ...
Actually Mike answered already similar question here Get reference to drawer toggle in support actionbar
I just reused his code. After you added the ActionBarDrawerToggle and called syncState() on it
you can iterate through children of the toolbar and then ...
Hopefully it helps