Android: how to transfer css file to html in the following situation

hello
In my application, I need to display the html page in a webview and this html page should link to the sdcard location for the .css file (using the link href = "...." tag).
I placed 2 files (ie) html and css) in sdcard-> mibook.
I tried to give an absolute path, how link href="/mnt/sdcard/mibook/0.css" can I specify the android path name?

Edited:
Problem above: using this link href = "file: ///sdcard/mibook/0.css" But I have the following requirement, I need to process about 50 + html files each time,

I placed all the 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 a css link as a link href = "/links/0.css" This css file should be referenced in html. How can i do this?

+3
source share
1 answer

Try

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

Assuming Android> = 2.1

+5
source

Source: https://habr.com/ru/post/1796265/


All Articles