【发布时间】:2013-11-26 08:02:01
【问题描述】:
我尝试在我的 android 项目中使用一个名为 Chunk Templates 的模板引擎(类似于速度)(在 https://code.google.com/p/chunk-templates/ 获取)。在使用它时,我需要访问我的资产文件夹中的模板文件:
Theme t = new Theme("path to file"); //path getAssets()..? file:///....?
Chunk c = t.makeChunk("template"); //template.chtml
c....
“template.chtml”位于我的 Eclipse 文件夹“assets\themes\template.chtml”中 在我的设备上运行它时,模板引擎说,找不到模板。
我必须使用什么路径?
您好, 哈兹蒂
【问题讨论】:
-
Typeface typeFace = Typeface.createFromAsset(activity.getAssets(), "fonts/roboto-light.ttf");用于获取字体,相应更改以使用主题 -
好主意,但 goolge 说它仅适用于字体...=((也 createFromAsset)
-
以下解决方案是否有效?
-
我都试过了,但都没有成功:(
标签: java android chunk-templates