问题描述
首先,此问题与以下内容有关:
First of all, this question is related: How big should Action Bar(Toolbar) icons be in the new Android Material design?
在相关问题中,很明显,操作栏图标的触摸目标大小应为48dp.我想对材料设计"中的这些图标大小进行一些澄清:
In the related question it is clear that the touch target size of the action bar icons should be 48dp. I would like to get a couple of things clarified regarding these icon sizes in Material Design:
-
在此页面上:材料设计关键点-触摸目标尺寸" 有两个图标,搜索图标很小(24dp),轮廓图标更大(40dp).在48dp触摸目标范围内,关于图标应该有多大,有什么建议吗?您可以从Material Design网站下载的操作栏图标看起来是40dp(即,作为链接网站中的配置文件按钮).
On this page: Material Design Keylines - Touch Target Size there is two icons, the search icon is tiny (24dp) and the profile icon is much bigger (40dp). Is there any recommendation on how big the icon should be, within the 48dp touch target? It looks like the action bar icons that you can download from the Material Design site is 40dp (i.e. as the profile button in the linked site).
我认为对于材料设计而言,旧的图像学"说明已过时,对吗?该页面说图标应为32dp,并带有24dp图标: Iconography .
I assume that the old Iconography instructions are out of date for Material Design, is that correct? This page says that the icons should be 32dp with a 24dp icon: Iconography.
我还注意到 Android Asset Studio 和用于材料设计的Android Asset Studio 生成具有 96x96像素的 xxhdpi 操作栏图标,但我假设它们应该为 144x144像素.我之所以这么认为是因为Material Design网站中图标中的xxhdpi 48dp操作栏图标为144x144像素. Material Design ActionBar图标对于xxhdpi应该为144x144像素正确吗?
I also noticed that Android Asset Studio and Android Asset Studio for Material Design generate xxhdpi action bar icons with 96x96 pixels but I assumed they should be 144x144 pixels. I assume this since the xxhdpi 48dp action bar icons in the icons from the Material Design site is 144x144 pixels. Is it correct that Material Design ActionBar icons should be 144x144 pixels for xxhdpi?
推荐答案
-
对于大多数功能都有建议.工具栏图标应始终为
24dp
,而圆形要素(包括图像和浮动按钮)应为40dp
.在链接的页面或组件"侧菜单中,可能会为不同的视图找到不同的值.
There are recommendation for most features. Toolbar icons should always be
24dp
, while as you say circular features (including images and floating buttons) should be40dp
. You might find different values for different views, in the page you linked or in the "Components" side menu.
我前一段时间从或 此处 .在这两种情况下,图标的大小均不同,分别为18dp
,24dp
,36dp
和48dp
.由您选择最佳大小并在视图上设置适当的填充,以确保48dp
可点击区域.在大多数情况下,如果选择AppCompat
或Material
主题,它将为您处理大小和填充.
I downloaded material icons some time ago, from here or here. In both cases icons are provided in different sizes, 18dp
, 24dp
, 36dp
and 48dp
. It's up to you to choose the best size and to set an appropriate padding on the view, to ensure a 48dp
clickable area. In most cases if you chose an AppCompat
or Material
theme it will handle sizing and padding for you.
除此之外,例如调整按钮大小时,我会从选择"中选择 按钮 组件"菜单,然后在此处获取尺寸信息.
Apart from that, e.g. when sizing a button, I would choose Buttons from the "Components" menu, and get size info there.
是.
您可能是正确的,xxhdpi的48dp
图标应为144x144像素.
You are probably right, 48dp
icons for xxhdpi should be 144x144 pixels.
这篇关于Material Design(Android API 21+)中建议的ActionBar图标大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!