Code example for WebView

Methods: loadDataWithBaseURLsetBackgroundColorsetPictureListenersetWebViewClient, getContext

0
	private void delaySetup() { 
		wv.setPictureListener(new PictureListener() {
 
			@Override 
			public void onNewPicture(WebView view, Picture picture) {
				wv.setPictureListener(null);
				setup(); 
			} 
 
		}); 
 
		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.loadDataWithBaseURL(null, html, "text/html", "utf-8", null);
		wv.setBackgroundColor(color);
 
	} 
 
	public void done(WebView view) {
		if (splash != null) {
Contextual code suggestions in your IDE  Get Codota for Java