ionic開(kāi)發(fā)框架-(2)圖標(biāo)及閃屏界面制作

概述

使用ionic命令肤晓,會(huì)自動(dòng)在resources文件夾下創(chuàng)建已添加的平臺(tái)名稱的文件夾耀盗,如:android,其中會(huì)自動(dòng)將圖片進(jìn)行縮放房匆、裁剪耸成,生成不同分辨率的圖片,并在config.xml中添加相應(yīng)內(nèi)容浴鸿。

操作步驟

1.在項(xiàng)目的根目錄下創(chuàng)建resources文件夾井氢。
2.在文件夾中都放入icon.png(應(yīng)用圖標(biāo),最小192x192px岳链,不帶圓角)花竞,splash.png(啟動(dòng)屏幕,最小2208x2208px宠页,中間區(qū)域1200x1200px)(可以是png左胞、psd、ai)
3.在cmd中進(jìn)入項(xiàng)目所在文件夾執(zhí)行:

ionic resources --icon //只會(huì)生成圖標(biāo)
ionic resources --splash //只會(huì)生成閃屏
ionic resources //同時(shí)生成圖標(biāo)及閃屏

生成結(jié)果

執(zhí)行結(jié)果
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 icon-small@3x.png (87x87)...
icon ios icon-small@3x.png (87x87) generated
generating icon ios icon-small@2x.png (58x58)...
splash ios Default-667h.png (750x1334) generated
generating icon ios icon-small.png (29x29)...
icon ios icon-small@2x.png (58x58) generated
generating icon ios icon-76@2x.png (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 icon-72@2x.png (144x144) generated
icon ios icon-72.png (72x72) generated
generating icon ios icon-60@3x.png (180x180)...
icon ios icon-76@2x.png (152x152) generated
generating icon ios icon-60@2x.png (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 icon-50@2x.png (100x100)...
icon ios icon-60@2x.png (120x120) generated
generating icon ios icon-50.png (50x50)...
icon ios icon-60@3x.png (180x180) generated
generating icon ios icon-40@2x.png (80x80)...
icon ios icon-50.png (50x50) generated
generating icon ios icon-40.png (40x40)...
icon ios icon-40@2x.png (80x80) generated
generating icon ios icon@2x.png (114x114)...
icon ios icon-40.png (40x40) generated
generating icon ios icon.png (57x57)...
icon ios icon-50@2x.png (100x100) generated
icon ios icon.png (57x57) generated
icon ios icon@2x.png (114x114) generated

坑洞說(shuō)明:

  1. 執(zhí)行以上命令時(shí)需在聯(lián)網(wǎng)下進(jìn)行
  2. 生成操作由服務(wù)器完成后下載到本地举户,經(jīng)常會(huì)因?yàn)榫W(wǎng)絡(luò)太慢導(dǎo)致生成失敗烤宙,一般我都會(huì)選擇移動(dòng)4G熱點(diǎn)下完成此操作

生成后的config.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><widget id="com.ild.qos" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>qos</name> <description> An Ionic Framework and Cordova project. </description> <author email="you@example.com" > Your Name Here </author> <content src="index.html"/> <access origin="*"/> <preference name="webviewbounce" value="false"/> <preference name="UIWebViewBounce" value="false"/> <preference name="DisallowOverscroll" value="true"/> <preference name="SplashScreenDelay" value="2000"/> <preference name="FadeSplashScreenDuration" value="2000"/> <preference name="android-minSdkVersion" value="16"/> <preference name="BackupWebStorage" value="none"/> <preference name="SplashScreen" value="screen"/> <feature name="StatusBar"> <param name="ios-package" value="CDVStatusBar" onload="true"/> </feature> <platform name="ios"> <icon src="resources/ios/icon/icon.png" width="57" height="57"/> <icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/> <icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> <icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/> <icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> <icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/> <icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> <icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/> <icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/> <icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> <icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/> <icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> <icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/> <icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> <icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/> <icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/> <splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/> <splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> <splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> <splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/> <splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/> <splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/> <splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/> <splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> <splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/> <splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> </platform> <platform name="android"> <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/> <splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/> <splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/> <splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/> <splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/> <splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/> <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> </platform> <icon src="resources/android/icon/drawable-xhdpi-icon.png"/></widget>

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市俭嘁,隨后出現(xiàn)的幾起案子躺枕,更是在濱河造成了極大的恐慌,老刑警劉巖供填,帶你破解...
    沈念sama閱讀 212,383評(píng)論 6 493
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件拐云,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡近她,警方通過(guò)查閱死者的電腦和手機(jī)叉瘩,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,522評(píng)論 3 385
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)粘捎,“玉大人薇缅,你說(shuō)我怎么就攤上這事≡苣ィ” “怎么了泳桦?”我有些...
    開(kāi)封第一講書人閱讀 157,852評(píng)論 0 348
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)娩缰。 經(jīng)常有香客問(wèn)我灸撰,道長(zhǎng),這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書人閱讀 56,621評(píng)論 1 284
  • 正文 為了忘掉前任浮毯,我火速辦了婚禮完疫,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘亲轨。我一直安慰自己趋惨,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,741評(píng)論 6 386
  • 文/花漫 我一把揭開(kāi)白布惦蚊。 她就那樣靜靜地躺著器虾,像睡著了一般。 火紅的嫁衣襯著肌膚如雪蹦锋。 梳的紋絲不亂的頭發(fā)上兆沙,一...
    開(kāi)封第一講書人閱讀 49,929評(píng)論 1 290
  • 那天,我揣著相機(jī)與錄音莉掂,去河邊找鬼葛圃。 笑死,一個(gè)胖子當(dāng)著我的面吹牛憎妙,可吹牛的內(nèi)容都是我干的库正。 我是一名探鬼主播,決...
    沈念sama閱讀 39,076評(píng)論 3 410
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼厘唾,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼褥符!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起抚垃,我...
    開(kāi)封第一講書人閱讀 37,803評(píng)論 0 268
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤喷楣,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后鹤树,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體铣焊,經(jīng)...
    沈念sama閱讀 44,265評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,582評(píng)論 2 327
  • 正文 我和宋清朗相戀三年罕伯,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了曲伊。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,716評(píng)論 1 341
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡追他,死狀恐怖熊昌,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情湿酸,我是刑警寧澤,帶...
    沈念sama閱讀 34,395評(píng)論 4 333
  • 正文 年R本政府宣布灭美,位于F島的核電站推溃,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏届腐。R本人自食惡果不足惜铁坎,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 40,039評(píng)論 3 316
  • 文/蒙蒙 一蜂奸、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧硬萍,春花似錦扩所、人聲如沸。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 30,798評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至买羞,卻和暖如春袁勺,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背畜普。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 32,027評(píng)論 1 266
  • 我被黑心中介騙來(lái)泰國(guó)打工期丰, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人吃挑。 一個(gè)月前我還...
    沈念sama閱讀 46,488評(píng)論 2 361
  • 正文 我出身青樓钝荡,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親舶衬。 傳聞我的和親對(duì)象是個(gè)殘疾皇子埠通,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,612評(píng)論 2 350

推薦閱讀更多精彩內(nèi)容

  • afinalAfinal是一個(gè)android的ioc,orm框架 https://github.com/yangf...
    passiontim閱讀 15,412評(píng)論 2 45
  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 171,841評(píng)論 25 707
  • 送君千里終別離,茫茫人海無(wú)知己圾浅,卻都敵不過(guò)終其一生不得你掠手。 ——引子 故事的開(kāi)頭很簡(jiǎn)單,不過(guò)是一雙有情的男女互相心...
    岑小夕閱讀 640評(píng)論 1 22
  • 【04/10/2017 周一 第221天 丁酉年 三月十四日】 ?靜√智√勇√仁√強(qiáng)√禮 小結(jié): √上午閱讀《詹姆...
    媽媽熊閱讀 206評(píng)論 0 1
  • 經(jīng)過(guò)上一章的內(nèi)容狸捕,其實(shí)就頁(yè)面層來(lái)說(shuō)已結(jié)可以很輕松的實(shí)現(xiàn)功能了喷鸽,但是很明顯美觀上還有很大的欠缺,現(xiàn)在有一些很好的前端...
    雙魚座的牛閱讀 472評(píng)論 0 3