Hi,
I have an HTML doc called test.html which I have kept in the raw folder. I want to display this doc in webview. Here's my code:
try {
InputStream is = getResources().openRawResource(R.raw.test);
int size = is.available() ;
byte[] buffer = new byte[size];
is.read(buffer);
data = new String(buffer);
is.close();
}
catch (Exception e) {
Log.e("", "ResourceUtils failed to load resource to string", e);
}
view.loadData(data, "text/html", "UTF-8");
The html doc also contains an image tag. Here's my html code:
<html>
<body>
<form name="input" action="html_form_action.asp" method="get">
Male:
<input type="radio" name="Sex" value="Male" checked="checked">
<br>
Female:
<input type="radio" name="Sex" value="Female">
<br>
<input type ="submit" value ="Submit">
</form>
<p>
If you click the "Submit" button, you will send your input to a new page.
</p>
<p>
An image:
<img src="icon.png"
width="144" height="50">
</p>
</body>
</html>
I want to display icon.png image. But it is unable to display the image.
I have kept this image in the same folder as that of html doc.
What is wrong with my code?
Need help!!!!
Thanx.

