Code example for WebView

Methods: layoutloadDataWithBaseURLsetPictureListenersetWebViewClient

0
		final String baseURL = this.getContentBaseURL();
		w.post(new Runnable() {
 
			@Override 
			public void run() { 
				w.setWebViewClient(new WebViewClient() {
					@Override 
					public void onPageFinished(WebView view, String url) {
						ready.set(true);
					} 
				}); 
				w.setPictureListener(new PictureListener() {
					@Override 
					public void onNewPicture(WebView view, Picture picture) {
						if (ready.get()) {
							final Canvas c = new Canvas(b);
							view.draw(c);
							w.setPictureListener(null);
							signal.countDown();
						} 
					} 
				}); 
				w.layout(0, 0, rect.width(), rect.height());
				w.loadDataWithBaseURL(baseURL, html, "text/html", "UTF-8", null);
			} 
		}); 
		try { 
			signal.await();
		} catch (InterruptedException e) {
Connect your IDE to all the code out there  Get Codota for Java