ionic开发框架-(2)图标及闪屏界面制作

概述

使用ionic命令,会自动在resources文件夹下创建已添加的平台名称的文件夹,如:android,其中会自动将图片进行缩放、裁剪,生成不同分辨率的图片,并在config.xml中添加相应内容。

操作步骤

1.在项目的根目录下创建resources文件夹。
2.在文件夹中都放入icon.png(应用图标,最小192x192px,不带圆角),splash.png(启动屏幕,最小2208x2208px,中间区域1200x1200px)(可以是png、psd、ai)
3.在cmd中进入项目所在文件夹执行:

ionic resources --icon //只会生成图标
ionic resources --splash //只会生成闪屏
ionic resources //同时生成图标及闪屏

生成结果

执行结果
ionic resources
Ionic icon and splash screen resources generator
uploading icon.psd...
uploading splash.psd...
icon.psd (192x192) upload complete
splash.psd (2208x2208) upload complete
generating splash android drawable-port-xxxhdpi-screen.png (1280x1920)...
generating splash android drawable-port-xxhdpi-screen.png (960x1600)...
generating splash android drawable-port-xhdpi-screen.png (720x1280)...
splash android drawable-port-xhdpi-screen.png (720x1280) generated
generating splash android drawable-port-hdpi-screen.png (480x800)...
splash android drawable-port-xxxhdpi-screen.png (1280x1920) generated
generating splash android drawable-port-mdpi-screen.png (320x480)...
splash android drawable-port-xxhdpi-screen.png (960x1600) generated
generating splash android drawable-port-ldpi-screen.png (240x320)...
splash android drawable-port-mdpi-screen.png (320x480) generated
generating splash android drawable-land-xxxhdpi-screen.png (1920x1280)...
splash android drawable-port-hdpi-screen.png (480x800) generated
generating splash android drawable-land-xxhdpi-screen.png (1600x960)...
splash android drawable-port-ldpi-screen.png (240x320) generated
generating splash android drawable-land-xhdpi-screen.png (1280x720)...
splash android drawable-land-xxxhdpi-screen.png (1920x1280) generated
generating splash android drawable-land-hdpi-screen.png (800x480)...
splash android drawable-land-xxhdpi-screen.png (1600x960) generated
generating splash android drawable-land-mdpi-screen.png (480x320)...
splash android drawable-land-xhdpi-screen.png (1280x720) generated
generating splash android drawable-land-ldpi-screen.png (320x240)...
splash android drawable-land-mdpi-screen.png (480x320) generated
generating icon android drawable-xxxhdpi-icon.png (192x192)...
splash android drawable-land-hdpi-screen.png (800x480) generated
generating icon android drawable-xxhdpi-icon.png (144x144)...
icon android drawable-xxhdpi-icon.png (144x144) generated
generating icon android drawable-xhdpi-icon.png (96x96)...
icon android drawable-xxxhdpi-icon.png (192x192) generated
generating icon android drawable-hdpi-icon.png (72x72)...
splash android drawable-land-ldpi-screen.png (320x240) generated

generating icon android drawable-mdpi-icon.png (48x48)...
icon android drawable-hdpi-icon.png (72x72) generated
generating icon android drawable-ldpi-icon.png (36x36)...
icon android drawable-mdpi-icon.png (48x48) generated
splash ios Default~iphone.png (320x480) generated
generating splash ios Default@2x~iphone.png (640x960)...
icon android drawable-xhdpi-icon.png (96x96) generated
generating splash ios Default-Portrait~ipad.png (768x1024)...
icon android drawable-ldpi-icon.png (36x36) generated
generating splash ios Default-Portrait@2x~ipad.png (1536x2048)...
splash ios Default-Portrait~ipad.png (768x1024) generated
generating splash ios Default-Landscape~ipad.png (1024x768)...
splash ios Default@2x~iphone.png (640x960) generated
generating splash ios Default-Landscape@2x~ipad.png (2048x1536)...
splash ios Default-Landscape~ipad.png (1024x768) generated
generating splash ios Default-Landscape-736h.png (2208x1242)...
splash ios Default-Portrait@2x~ipad.png (1536x2048) generated
generating splash ios Default-736h.png (1242x2208)...
splash ios Default-Landscape@2x~ipad.png (2048x1536) generated
generating splash ios Default-667h.png (750x1334)...
splash ios Default-736h.png (1242x2208) generated
generating splash ios Default-568h@2x~iphone.png (640x1136)...
splash ios Default-Landscape-736h.png (2208x1242) generated
generating icon ios [email protected] (87x87)...
icon ios [email protected] (87x87) generated
generating icon ios [email protected] (58x58)...
splash ios Default-667h.png (750x1334) generated
generating icon ios icon-small.png (29x29)...
icon ios [email protected] (58x58) generated
generating icon ios [email protected] (152x152)...
splash ios Default-568h@2x~iphone.png (640x1136) generated
generating icon ios icon-76.png (76x76)...
icon ios icon-small.png (29x29) generated
icon ios [email protected] (144x144) generated
icon ios icon-72.png (72x72) generated
generating icon ios [email protected] (180x180)...
icon ios [email protected] (152x152) generated
generating icon ios [email protected] (120x120)...
icon ios icon-76.png (76x76) generated
generating icon ios icon-60.png (60x60)...
icon ios icon-60.png (60x60) generated
generating icon ios [email protected] (100x100)...
icon ios [email protected] (120x120) generated
generating icon ios icon-50.png (50x50)...
icon ios [email protected] (180x180) generated
generating icon ios [email protected] (80x80)...
icon ios icon-50.png (50x50) generated
generating icon ios icon-40.png (40x40)...
icon ios [email protected] (80x80) generated
generating icon ios [email protected] (114x114)...
icon ios icon-40.png (40x40) generated
generating icon ios icon.png (57x57)...
icon ios [email protected] (100x100) generated
icon ios icon.png (57x57) generated
icon ios [email protected] (114x114) generated

坑洞说明:

  1. 执行以上命令时需在联网下进行
  2. 生成操作由服务器完成后下载到本地,经常会因为网络太慢导致生成失败,一般我都会选择移动4G热点下完成此操作

生成后的config.xml

qos An Ionic Framework and Cordova project. Your Name Here

你可能感兴趣的:(ionic开发框架-(2)图标及闪屏界面制作)