how can i show icon app in Lollipop Toolbar?

2019-04-30 09:20发布

问题:

I am missing an app icon after switching from ICS ActionBar to Lollipop toolbar. Is it possible? Please help me. Thanks

mDrawerToggle.setDrawerIndicatorEnabled(false);

回答1:

The use of application icon and a title is discouraged on API 21,according to Material Design.

Anyway if you want to use an icon, you can use the setLogo method in your Toolbar.