资产文件夹的绝对路径 [英] Absolute path of assets folder

查看:152
本文介绍了资产文件夹的绝对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何引用资产由手机内存?我需要它写的绝对路径到一个HTML文件来加载某些图像这是在资产的文件夹中。此HTML保存在手机内存中,但我不能在手机内存中这些图像保存,因为这些都是非常大的。

How do I reference the assets from phone memory? I need it to write the absolute path into a html file to load some images which are in assets folder. This html is saved in the phone memory but I can't to save these images in the memory phone because these are very big.

推荐答案

的file:/// android_asset / ... ,其中 .. 是你的东西资产/ 目录中。请注意,只有将自己的过程中工作,这样你就可以加载HTML到的WebView 这种方式,但不是到浏览器的应用程序。

file:///android_asset/..., where ... is the stuff inside your assets/ directory. Note that will only work within your own process, so you can load the HTML into a WebView this way, but not into the Browser application.

这篇关于资产文件夹的绝对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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