2017-07-17 72 views
0

通過Cordova config.xml添加圖像時,我可以很好地添加圖像。但我無法添加縮放圖像。我按照文檔,可以添加這些圖像:Cordova Windows UAP無法添加縮放圖像

<platform name="windows"> 
    <icon src="res/windows/storelogo.png" target="StoreLogo" /> 
    <icon src="res/windows/smalllogo.png" target="Square30x30Logo" /> 
    <icon src="res/windows/Square44x44Logo.png" target="Square44x44Logo" /> 
    <icon src="res/windows/Square70x70Logo.png" target="Square70x70Logo" /> 
    <icon src="res/windows/Square71x71Logo.png" target="Square71x71Logo" /> 
    <icon src="res/windows/Square150x150Logo.png" target="Square150x150Logo" /> 
    <icon src="res/windows/Square310x310Logo.png" target="Square310x310Logo" /> 
    <icon src="res/windows/Wide310x150Logo.png" target="Wide310x150Logo" /> 
</platform> 

但是,我無法爲上面的每個圖像添加任何縮放圖像。該Cordova docs'指令不工作,也不做這種格式:

<icon src="res/windows/Square44x44Logo.scale-240.png" width="106" height="106" /> 

有沒有人成功地通過科爾多瓦config.xml中添加縮放的圖像?

此外,如果我手動添加圖像,Visual Studio崩潰,不再加載項目,我必須手動添加和刪除平臺,每次我做一個新的構建。

回答

0

您爲每個圖像的鏈接,像這樣:

 <icon src="res/images/windows/icon/Square44x44Logo.scale-400.png" target="Square44x44Logo" /> 
    <icon src="res/images/windows/icon/Square44x44Logo.scale-200.png" target="Square44x44Logo" /> 
    <icon src="res/images/windows/icon/Square150x150Logo.scale-400.png" target="Square150x150Logo" /> 
    <icon src="res/images/windows/icon/Square150x150Logo.scale-200.png" target="Square150x150Logo" /> 

即鏈接Square44x44Logo目標與縮放Square44x44Logo.scale-200.png(acutal尺寸:88x88px)