title: Showing an image in a webview (not working) android
body: <p>Im trying to show an image in an webview but my app crashes as soon as it gets to the activity where the webview is loaded.</p>
  
  <pre><code>    WebView myWebView = (WebView) findViewById(R.id.webView1);
      myWebView.getSettings().setJavaScriptEnabled(true);
   //   myWebView.getSettings().setBuiltInZoomControls(true);
   //   myWebView.getSettings().setSupportZoom(true);
      myWebView.loadUrl("http://www.de-saksen.nl/2/images/comprofiler/62_4dc3051f2b262.jpg");
   //     myWebView.loadData(
   //            "&lt;img src='http://www.de-saksen.nl/2/images/comprofiler/62_4dc3051f2b262.jpg'&gt;",
   //            "text/html", "UTF-8");
  </code></pre>
  
  <p>I've been puzzeling with the code a little but nothing helps.</p>
  
  <p>The activity is in the Manifest.xml and it allows internet permission.</p>
  
  <p>EDIT: Reading all of your awnsers helpt alot and noticed that the image loads if I place the code inside an new activity, but I need to be able to load it in this one:</p>
  
  <pre><code>public class Profileviewer extends ListActivity {
  
  
  /** Called when the activity is first created. */
  
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
  
  
      setContentView(R.layout.listplaceholder);
  
  
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; mylist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
  
      JSONObject json = JSONfunctions.getJSONfromURL("http://de-saksen.nl/deelnemers.txt");
  
  
  
      try{
  
          JSONArray  deelnemers = json.getJSONArray("deelnemers");
  
          int Key = getIntent().getIntExtra("Key", -1);
  
              { HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();  
              JSONObject e = deelnemers.getJSONObject(Key);
  
              map.put("id",  String.valueOf(Key));
              map.put("name", "Naam: " +  e.getString("naamingw2"));
              map.put("sex", "Geslacht: " +  e.getString("geslacht"));
              map.put("rank", "Rang: " +  e.getString("rang"));
              map.put("race", "Ras: " +  e.getString("ras"));
              map.put("profession", "Beroep: " +  e.getString("beroep"));
              map.put("skills", "Hobby's: " +  e.getString("hobbys"));
              map.put("lvl", "Level: " +  e.getString("level"));
              map.put("avatar", e.getString("avatar"));
              mylist.add(map);            
          }   
  
  
  
      }catch(JSONException e)        {
           Log.e("log_tag", "Error parsing data "+e.toString());
      }
  
      ListAdapter adapter = new SimpleAdapter(this, mylist , R.layout.profile, 
                      new String[] { "name", "sex", "rank", "race", "profession", "skills", "lvl" }, 
                      new int[] { R.id.item_title, R.id.item_subtitle, R.id.item_subtitle2, R.id.item_subtitle3, R.id.item_subtitle4, R.id.item_subtitle5, R.id.item_subtitle6 });
  
      setListAdapter(adapter);
  
  
  
  
      final ListView lv = getListView();
      lv.setTextFilterEnabled(true);  
      lv.setOnItemClickListener(new OnItemClickListener() {
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {              
              Intent intent = new Intent(Profileviewer.this, Listviewer.class);   
              intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
              startActivity(intent); 
          }
      });
  
  
  
  }
  }
  </code></pre>
  
  <p>Because in this activity I have the current selected user.</p>