对于HDPI, XHDPI等,理想的启动器图标的大小应该是什么?我应该为图标创建9-Patch图像来自动缩放,还是创建单独的图标会更好?
当前回答
LDPI应该是36 x 36。
MDPI 48×48。
电视DPI 64 x 64。
HDPI 72 x 72。
XHDPI 96 x 96。
XXHDPI 144 x 144。
XXXHDPI 192 x 192。
其他回答
I had the same problem but then realized the arrangement of my icon graphic within the square allowed (512 x 512 in my case) was not maximized. So I rotated the image and was able to scale it up to fill the corners better. Then I right clicked on my res folder in my project in Android Studio, then choose New then Image Asset, it took me through a wizard where I got to select my image file to use. Then if you check the box that says "Trim surrounding blank space", it makes sure all edges, that are able, touch the sides of your square. These steps got it much bigger than the original.
我已经发布了一个脚本,从一个SVG图标文件生成PhoneGap应用程序的所有平台图标。如果您有现有的位图,我还提供了一些注释,可以帮助您从现有的位图生成SVG向量。这并不适用于所有位图,但可能适用于你的位图。
https://github.com/tohagan/phonegap-graphics
Android图标需要5种不同屏幕像素密度的大小。低分辨率的图标是自动从基线创建的。
mdpi (Baseline): 160 dpi 1×
hdpi: 240 dpi 1.5×
xhdpi: 320 dpi 2×
xxhdpi: 480 dpi 3×
xxxhdpi: 640 dpi 4× (launcher icon only)
启动器图标(.Png)
48 × 48 (mdpi)
72 × 72 (hdpi)
96 × 96 (xhdpi)
144 × 144 (xxhdpi)
192 × 192 (xxxhdpi)
512 × 512 (Google Play store)
操作栏,对话框和标签图标
24 × 24 area in 32 × 32 (mdpi)
36 × 36 area in 48 × 48 (hdpi)
48 × 48 area in 64 × 64 (xhdpi)
72 × 72 area in 96 × 96 (xxhdpi)
96 × 96 area in 128 × 128 (xxxhdpi)*
通知图标
22 × 22 area in 24 × 24 (mdpi)
33 × 33 area in 36 × 36 (hdpi)
44 × 44 area in 48 × 48 (xhdpi)
66 × 66 area in 72 × 72 (xxhdpi)
88 × 88 area in 96 × 96 (xxxhdpi)*
小的上下文图标
16 × 16 (mdpi)
24 × 24 (hdpi)
32 × 32 (xhdpi)
48 × 48 (xxhdpi)
64 × 64 (xxxhdpi)*
xxxhdpi的大小只需要启动器图标支持多屏幕官方网站说。
用于谷歌Play Store应用程序提交的启动图像和斜杠图像大小
高分辨率图标。PFB表为所需尺寸 32位PNG(带alpha),尺寸:512px * 512px,最大文件大小:1024KB
所需的启动图标和飞溅图像大小
总体上至少需要2张截图(每种类型最多8张截图,类型包括“手机”,“7英寸平板电脑”和“10英寸平板电脑”) JPEG或24位PNG(无alpha),最小尺寸:320px,最大尺寸:3840px,样本尺寸:320 x 480,480 x 800,480 x 854,1280 x 720, 1280 x 800 24位PNG或JPEG
根据材质设计指南(这里,在“DP单元网格”下),你的产品图标的大小应该是48dp,填充为1dp,除了XXXHDPI的情况,填充应该是4dp。
所以,以像素为单位,大小是:
48 × 48 (mdpi),带有1dp填充 72 × 72 (hdpi),带有1dp填充 96 × 96 (xhdpi),带有1dp填充 144 × 144 (xxhdpi),带有1dp填充 192 × 192 (xxxhdpi), 4 dp填充
我建议避免使用VectorDrawable,因为一些启动器不支持它,但我认为WEBP应该是ok的,只要你有你的minSdk支持透明度(API 18及以上- Android 4.3)。
如果你在Play Store上发布内容,关于上传内容的要求如下(基于这里):
32位PNG(带alpha) 尺寸:512px * 512px 最大文件大小:1024KB
推荐文章
- 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
- 安装APK时出现错误
- 碎片中的onCreateOptionsMenu
- TextView粗体通过XML文件?
- 如何使线性布局的孩子之间的空间?
- DSL元素android.dataBinding。enabled'已过时,已被'android.buildFeatures.dataBinding'取代
- ConstraintLayout:以编程方式更改约束
- PANIC: AVD系统路径损坏。检查ANDROID_SDK_ROOT值
- 如何生成字符串类型的buildConfigField
- Recyclerview不调用onCreateViewHolder
- Android API 21工具栏填充
- Android L中不支持操作栏导航模式
- 如何在TextView中添加一个子弹符号?
- PreferenceManager getDefaultSharedPreferences在Android Q中已弃用
- 在Android Studio中创建aar文件