private void updatePreview() { if (mWebView == null) return; WebSettings ws = mWebView.getSettings(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); int fontSize = prefs.getInt(Constants.PREFERENCE_MINIMUM_FONT_SIZE, 1); int textScaling = prefs.getInt(Constants.PREFERENCE_TEXT_SCALING, 100); ws.setMinimumFontSize(fontSize); ws.setTextZoom(textScaling); mWebView.loadData(mHtml, "text/html; charset=utf-8", "utf-8"); }