Code example for ScrollView

Methods: addView

0
	 * @param html 
	 */ 
	public static void showHtml(final Context context, final String html) {
		AlertDialog.Builder moreDetailsDialog = null;
		final WebView webView = new WebView(context);
		final ScrollView scrollView = new ScrollView(context);
 
		webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
		webView.setBackgroundColor(Color.WHITE);
		webView.loadDataWithBaseURL("fake://not/needed", html, "text/html", "UTF-8", null); // Encoding
																							// fix 
																							// for 
																							// Android 
																							// 3.x 
																							// / 
																							// 4.x 
		scrollView.addView(webView);
 
		moreDetailsDialog = new AlertDialog.Builder(context);
		moreDetailsDialog.setIcon(android.R.drawable.ic_dialog_info);
		moreDetailsDialog.setTitle("Informations");
		moreDetailsDialog.setView(scrollView);
Stop searching for code, let great code find you!  Add Codota to your java IDE