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


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 page content here..
<img src="file:///data/data/com.apps.myapp/files/user.png" />


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.
Ankit Shah
Once Poster
Once Poster
Posts: 1
Joined: Mon Sep 21, 2009 2:59 pm
Location: India


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 12 guests