我是 phonegap 的新手,我想显示来自 android res 的图像。 drawable/img.png 到我的 index.html 文件。
android phonegap 可以吗?任何人都可以解释清楚吗?
最佳答案
如果您需要在您的自定义 html 文件中插入图像,您可以毫无问题地使用 res 目录中的图像。这是在 Android ICS 上。
img src="file:///android_res/drawable/myimage.png"
Android 将根据 dpi 选择正确的图像。
关于html 文件中的 Android PhoneGap : use res/drawable/img. png,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11444930/