Load Html text & image in WebView (from in files directo

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Load Html text & image in WebView (from in files directo

Postby AShah » Mon Sep 21, 2009 3:16 pm

Hi,

I would like to load Html page content and image in WebView.
(Note: Html page and image are stored in applications 'files:///' directory)

Html page data:

<html>
<body>
...
Html page content here..
<br>
...
<img src="file:///data/data/com.apps.myapp/files/user.png" />

</body>
</html>


Code:
webview.loadDataWithBaseURL("file:///data/data/com.apps.myapp/files/", htmldata, "text/html", "UTF-8",null);


Now this loads only html text part in WebView - Is it possible to load an image (with Html text) from the files directory?


Any pointer or help on this would be greatly appreciated.

Thank You.
Regards,
Ankit Shah
AShah
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Sep 21, 2009 2:59 pm
Location: India

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 6 guests