Code example for WebView

Methods: loadDataWithBaseURLsetBackgroundColorsetPictureListenersetWebViewClient, getContext

0
		wv.setPictureListener(new PictureListener() {
			 
 
			@Override 
			public void onNewPicture(WebView view, Picture picture) {
				wv.setPictureListener(null);
				setup(); 
			} 
			 
			 
		}); 
		 
		//wv.setInitialScale(100); 
		wv.loadData("<html></html>", "text/html", "utf-8");
		wv.setBackgroundColor(color);
		 
	} 
	 
	 
    private void setup(){ 
    	 
    	String source = getSource(wv.getContext());
    	String html = source.replace("@src", url).replace("@color", Integer.toHexString(color));
    	 
    	wv.setWebViewClient(this);
    	 
    	//wv.setInitialScale(100); 
    	wv.loadDataWithBaseURL(null, html, "text/html", "utf-8", null);
    	wv.setBackgroundColor(color);
    	 
    } 
	 
    private void done(WebView view){
    	if(progress != null){