Code example for WebView

Methods: loadDataWithBaseURL

0
                                         responseHandler);
      buildForecasts(responseBody);
       
      String page=generatePage();
     
      browser.loadDataWithBaseURL(null, page, "text/html",
                                  "UTF-8", null); 
    } 
    catch (Throwable t) {
      android.util.Log.e("WeatherDemo", "Exception fetching data", t);
      Toast 
        .makeText(this, "Request failed: "+t.toString(), Toast.LENGTH_LONG)
        .show();
    } 
  } 
   
  void buildForecasts(String raw) throws Exception {
    DocumentBuilder builder=DocumentBuilderFactory
                              .newInstance()
                              .newDocumentBuilder();
    Document doc=builder.parse(new InputSource(new StringReader(raw)));