title: how to display a html page with image in android?
body: <p>hi i want to display my html image on android emulator, please help    </p>
  
  <pre><code>package com.Htmlview;
  
  import ja va.io.BufferedInputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.text.MessageFormat;
  
  import android.app.Activity;
  import android.content.res.AssetManager;
  import android.os.Bundle;
  import android.webkit.WebView;
  
  public class Htmlview extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          //setContentView(R.layout.main);
          WebView webview = new WebView(this);
          setContentView(webview);
          try {
  
                 String imageString="&lt;html&gt;&lt;body&gt;" +
                  "&lt;h2&gt;Norwegian Mountain Trip&lt;/h2&gt;" +
                  "&lt;img src=\"C:/Users/Public/Pictures/Sample Pictures/pulpit.jpg\" alt=\"Pulpit rock\" width=\"304\" height=\"228\" /&gt;&lt;/body&gt;&lt;/html&gt;";
                  AssetManager mgr = this.getAssets(); 
                  InputStream is = mgr.open("index3.html");
                  BufferedInputStream in = new BufferedInputStream(is); // read the contents of the file 
  
                webview.loadData(MessageFormat.format(imageString,arguments),"text/html", "UTF-8");
  
                     } catch (IOException e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>