Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the size of hamburger icon in toolbar?

I have 2 questions which can be strange but anyway...

I have toolbar with a title of application. How to change it to picture which is not the logo?

The next question: Is it possible to set, change the size of hamburger icon in toolbar? I made classic navigation drawer with the help of next code below (I used ActionBarDrawerToggle also) but the size is too small if you will compare it with another items(icons) of my toolbar.

toolbar = (Toolbar) findViewById(R.id.application_toolbar);
setSupportActionBar(toolbar);

getSupportActionBar().setDisplayShowHomeEnabled(true);

NavigationDrawerFragment drawerFragment = (NavigationDrawerFragment)getFragmentManager().findFragmentById(R.id.fragment_navigation_drawer);
drawerFragment.setUp(R.id.fragment_navigation_drawer,(DrawerLayout)findViewById(R.id.drawer_layout), toolbar );

Thanks for any help! =)

like image 817
Nurzhan Nogerbek Avatar asked Dec 19 '22 07:12

Nurzhan Nogerbek


1 Answers

I had solved this problem by this way:

for (int i = 0; i < mToolbar.getChildCount(); i++) {
   if(mToolbar.getChildAt(i) instanceof ImageButton){
       mToolbar.getChildAt(i).setScaleX(1.5f);
       mToolbar.getChildAt(i).setScaleY(1.5f);
   }
}

and my hamburger icon size had been increased.

like image 76
FromTheSeventhSky Avatar answered Jan 15 '23 04:01

FromTheSeventhSky