资产 - "图片","声音"和" webkit的"? [英] Assets - "images", "sounds", and "webkit"?

查看:174
本文介绍了资产 - "图片","声音"和" webkit的"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得递归加载所有我已经把内部的资产文件夹,我的项目中的资产。当我做了以下内容:

I am trying to get recursively load all the assets I have placed within the "assets" folder within my project. When I do the following:

AssetManager assetManager = getResources().getAssets();
String assets[] = assetManager.list("");

和检查什么字符串装入资产阵,我发现我已经放在指定的文件夹中,伴随着琴弦图像,声音和WebKit的资产。有谁知道这是为什么?

and the check what strings were loaded into the assets array, I find the assets I have placed within the specified folder, along with the strings "images", "sounds", and "webkit". Does anyone know why this is?

有关的背景资料(还不知道它是否适用),我的资产是包含完整的HTML网页,我用它来加载到WebViews zip文件。

For background information (don't yet know if it is applicable), my assets are zip files that contain complete html webpages, which I use to load into WebViews.

推荐答案

我也注意到这一点。这里有一些资产被放置在这些目录中:

I also have noted this. Here are some assets that are placed in those directories:

webkit/play.png
webkit/nullPlugin.png
webkit/missingImage.png
webkit/android-weberror.png
sounds/bootanim1.raw
images/comobox-disabled.png
images/comobox-noHighlight.png 

我的猜测是,系统依赖于该资产为present在所有的apk文件。而不是构建它们(这将增加所有的apk文件大小),但是,机器人通过资产API模仿他们。

My guess is that system relies on this assets to be present in all .apk files. But instead of building them in (which would increase size of all .apk files), Android emulates them via asset API.

此外,作为一个副作用,你可以用一个拥有内置其中的任何同名自定义资产覆盖此资产。不认为这可能是太有用的,但是这是可能的。

Also, as a side-effect, you can override this assets with any custom asset that has same name as built-in one. Not that this may be too useful, but this is possible.

这篇关于资产 - "图片","声音"和" webkit的"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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