PhoneGap的Andr​​oid的:如何强制应用程序使用的图标,从资产\ WWW \资源,而不是资源\绘制文件夹? [英] PhoneGap Android: How to force Application to use icons from asset\www\res instead res\drawable folder?

查看:106
本文介绍了PhoneGap的Andr​​oid的:如何强制应用程序使用的图标,从资产\ WWW \资源,而不是资源\绘制文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创造了新的Andr​​oid的PhoneGap项目使用Eclipse,并把我的iPhone的PhoneGap项目中我现有的WWW文件夹。

I have created new Android phonegap project using eclipse and put my existing WWW folder of my iphone phonegap project.

我把所有的图标和屏幕增加了对Android设备的Andr​​oid文件夹内的节目在这里..也把它添加到我的config.xml

I have all the icons and screen added for android device inside Android folder as show here.. and also added it to my config.xml

有关华电国际我有以下的图标和屏幕。

For HDPI I have following icon and screen.

资产\ WWW \水库\图标\机器人\图标-72-hdpi.png

资产\ WWW \水库\屏\机器人\屏幕HDPI-portrait.png

当我运行模拟器的应用程序,它继续显示默认的PhoneGap图标和启动画面。

When I run the application in Emulator, it keep showing the default PhoneGap icons and splash screen.

我添加的图标和屏幕的LDIP,MDPI,华电国际,XHDPI。

I have added icons and screens for LDIP, MDPI, HDPI, XHDPI.

这是我的config.xml

here is my config.xml

   <icon src="icon.png" />
<icon src="res/icon/android/icon-36-ldpi.png"   gap:platform="android"    gap:density="ldpi" />
<icon src="res/icon/android/icon-48-mdpi.png"   gap:platform="android"    gap:density="mdpi" />
<icon src="res/icon/android/icon-72-hdpi.png"   gap:platform="android"    gap:density="hdpi" />
<icon src="res/icon/android/icon-96-xhdpi.png"  gap:platform="android"    gap:density="xhdpi" />

请问有什么需要设置为使用资产\ WWW \ RES 文件夹,而不是默认的Eclipse EclipseProjectRoot \水库\绘制文件夹?

Is there anything I need to set to use assets\www\res folder instead of the default eclipse EclipseProjectRoot\res\drawable folder ?

感谢

推荐答案

config.xml中仅使用了PhoneGap的建设服务。

- 建立在本地,这个文件将被忽略,在RES /绘制目录中的文件用于
。 - 建设有PGBuild,服务查找该文件在您的项目(旁边的index.html)的根源,并使用它来识别他们的到底是什么形象应该被复制到RES /绘制文件夹中生成具有正确的APK图像(在机器人的情况下)。

由于PGBuild建立了很多的平台,config.xml的是他们提供尽可能多的定制capabilites,因为他们可以在HTML / JS / CSS以外的方式。一些这只是采摘你的图标/飞溅图像的每个平台,但是可以做更多的事情太多。 PGBuild做各的基础上,上传文件的内容,每个平台的本机所需的操作。

config.xml is used only by the PhoneGap Build service.

- Building locally, this file is ignored and the files in your res/drawable directory are used.
- Building with PGBuild, the service looks for this file at the root of your project (next to index.html) and uses it to identify what images should be copied into the res/drawable folder on their end to generate an apk with the right images (in the case of Android).

Since PGBuild builds for a lot of platforms, config.xml is their way of offering as much customisation capabilites as they can outside of the html/js/css. Some of this is just for picking your icons/splash images for each platform but you can do a lot more with too. PGBuild does each of the natively required actions for each platform based on the contents of the uploaded file.

我希望这是很清楚。

这篇关于PhoneGap的Andr​​oid的:如何强制应用程序使用的图标,从资产\ WWW \资源,而不是资源\绘制文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆