heng chen
heng chen

Reputation: 13

Android-How do I change the size of the ActionBarDrawerToggle Icon?

I want to make ActionBarDrawerToggle(Hamburger) Icon bigger.

I have try changing the width of bar, but it can't change.

And what should I do?

Upvotes: 1

Views: 593

Answers (2)

Adding to Yaw's Answer.

You should write like this:

toolbar.post(new Runnable() {
@Override
public void run() {
        for (int i = 0; i < toolbar.getChildCount(); i++) {
            if(toolbar.getChildAt(i) instanceof ImageButton){
                toolbar.getChildAt(i).setScaleX(1.5f);
                toolbar.getChildAt(i).setScaleY(1.5f);
            }
        }
    }
});

Upvotes: 0

Yaw Ansong Snr
Yaw Ansong Snr

Reputation: 517

Try this:

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);
   }
}

Upvotes: 1

Related Questions