更改工具栏中的汉堡包图标的大小?

问题描述:

我有2个可能很奇怪的问题,但无论如何...

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?

下一个问题:是否可以设置,更改工具栏中汉堡图标的大小?我借助下面的下一个代码制作了经典的导航抽屉(我也使用了ActionBarDrawerToggle),但是如果您将其与工具栏的其他项目(图标)进行比较,则尺寸太小。

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

感谢您的帮助! =)

我已经通过以下方式解决了这个问题:

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.