更改工具栏中的汉堡包图标的大小? [英] Change the size of hamburger icon in toolbar?

查看:140
本文介绍了更改工具栏中的汉堡包图标的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有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.

这篇关于更改工具栏中的汉堡包图标的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆