Android HTML resource with references to other resources

前端 未结 2 1145
忘掉有多难
忘掉有多难 2021-01-06 06:33

I would like to add an HTML resource to my Android project with references to other resources (mainly drawables).

Where should I put it and how do I reference other

2条回答
  •  滥情空心
    2021-01-06 07:17

    The html file goes into the assets folder in root (as a sibling folder of res), as well as all the drawables. You can view it by doing something like

    webView.loadUrl("file:///android_asset/filename.html");
    

提交回复
热议问题