开发者

Android:How to refer css file within html in following situation

开发者 https://www.devze.com 2023-02-14 23:33 出处:网络
hi In my application i need to displa开发者_C百科y a html page in webview and that html page should refer to sdcard location for .css file (Using link href=\"....\" tag).

hi

In my application i need to displa开发者_C百科y a html page in webview and that html page should refer to sdcard location for .css file (Using link href="...." tag).

I placed 2 files (i.e) html and css ) in sdcard->mibook.

I tried by giving absolute path as link href="/mnt/sdcard/mibook/0.css" how can i specify path name android?

Edited:

Above problem solved : by using this- link href="file:///sdcard/mibook/0.css" But i have following requirement, i need to handle around 50+ html file every time ,

I placed all files as follows,

mibook->book1->pg90.sqlite

mibook->book1->links->o.css and 1.css

The sqlite file contains html pages. each html page has css reference as link href="/links/0.css" These css file should be refer by html. how can i do this?


Try

link href="file:///sdcard/mibook/0.css"

Assuming Android >= 2.1

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号