is there any way to have an html file (i.e. an html template) be a resource in android? I'd like to reference it in a sim开发者_JAVA百科ilar way that i store strings in the res/values/strings.xml. However, when i do this, it appears the HTML is not getting rendered correctly when i use myTextView.setText(Html.fromHtml(MessageFormat
.format(getResources().getString(R.string.myHtmlFile), ...)
You can place raw HTML or other format files in /res/raw or /assets directory of your project. You can access the first with this method, and the second with this.
精彩评论