Align an icon with the Toolbar icon - Android Material Design

僤鯓⒐⒋嵵緔 提交于 2019-12-03 11:58:11

The problem is that I can't perfectly align it, because after that left padding of 16px, the icons should start, but the icon itself has also some "padding" (icon from material github)

Yes, the icon must have some padding and it varies depending on which screen resolution the icon will be displayed. The padding for different screen density:
mdpi        4px * 1.0 = 4px
hdpi         4px * 1.5 = 6px
xhdpi       4px * 2.0 = 8px
xxhdpi     4px * 3.0 = 12px
xxxhdpi   4px * 4.0 = 16px
This is the padding included in the icon drawable and you shouldn't remove it.

http://www.google.com/design/spec/style/icons.html#icons-system-icons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!