Android 8 个状态栏图标的正确资产大小是多少(Android 给出了相互矛盾的信息)
What are correct asset sizes for Android 8 status bar icons (Android gives conflicting info)
Android 状态栏图标的大小应该为 24dp 还是 18dp?
我看到有冲突 advice/examples:
- 24dp 来自 Android API guidelines
- 24dp 来自 Android icon templates pack
- 实际的mdpi PSD文件是24px,@1x就是24dp
- 18dp 根据 Pixel phone 的屏幕截图测量
- 图标尺寸为 47 像素。除以像素密度 2.6 得到 @1x = 18dp
同时,根据 material design guidelines,状态栏本身是 24dp 高,符合屏幕截图尺寸 (63px / 2.6 = 24dp)。但如果这些都是真的,那么状态栏图标必须更小。
如您链接的文档中所述,应以 24x24 dp 的大小提供图标。之所以显得小是因为系统会自动缩小它们:
The system may dim and shrink status bar icons to allow users to focus on the foreground activity. For example, in Android 4.0, the platform-standard status bar for handset-size devices reduces icons to 18 x 18 dip and 40% opacity in the status bar, while drawing them full-size and at full intensity in the expanded notification panel.
Android 状态栏图标的大小应该为 24dp 还是 18dp?
我看到有冲突 advice/examples:
- 24dp 来自 Android API guidelines
- 24dp 来自 Android icon templates pack
- 实际的mdpi PSD文件是24px,@1x就是24dp
- 18dp 根据 Pixel phone 的屏幕截图测量
- 图标尺寸为 47 像素。除以像素密度 2.6 得到 @1x = 18dp
同时,根据 material design guidelines,状态栏本身是 24dp 高,符合屏幕截图尺寸 (63px / 2.6 = 24dp)。但如果这些都是真的,那么状态栏图标必须更小。
如您链接的文档中所述,应以 24x24 dp 的大小提供图标。之所以显得小是因为系统会自动缩小它们:
The system may dim and shrink status bar icons to allow users to focus on the foreground activity. For example, in Android 4.0, the platform-standard status bar for handset-size devices reduces icons to 18 x 18 dip and 40% opacity in the status bar, while drawing them full-size and at full intensity in the expanded notification panel.