set article content webview font size properly
This commit is contained in:
parent
0d6b35373d
commit
e6295be411
@ -235,15 +235,17 @@ public class ArticleFragment extends Fragment {
|
|||||||
|
|
||||||
String align = m_prefs.getBoolean("justify_article_text", true) ? "text-align : justify;" : "";
|
String align = m_prefs.getBoolean("justify_article_text", true) ? "text-align : justify;" : "";
|
||||||
|
|
||||||
|
cssOverride += "body { "+align+" } ";
|
||||||
|
|
||||||
switch (Integer.parseInt(m_prefs.getString("font_size", "0"))) {
|
switch (Integer.parseInt(m_prefs.getString("font_size", "0"))) {
|
||||||
case 0:
|
case 0:
|
||||||
cssOverride += "body { "+align+" font-size : 14px; } ";
|
ws.setDefaultFontSize(13);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
cssOverride += "body { "+align+" font-size : 16px; } ";
|
ws.setDefaultFontSize(16);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
cssOverride += "body { "+align+" font-size : 20px; } ";
|
ws.setDefaultFontSize(18);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,15 +262,17 @@ public class OfflineArticleFragment extends Fragment {
|
|||||||
|
|
||||||
String align = m_prefs.getBoolean("justify_article_text", true) ? "text-align : justified" : "";
|
String align = m_prefs.getBoolean("justify_article_text", true) ? "text-align : justified" : "";
|
||||||
|
|
||||||
|
cssOverride += "body { "+align+" } ";
|
||||||
|
|
||||||
switch (Integer.parseInt(m_prefs.getString("font_size", "0"))) {
|
switch (Integer.parseInt(m_prefs.getString("font_size", "0"))) {
|
||||||
case 0:
|
case 0:
|
||||||
cssOverride += "body { "+align+"; font-size : 14px; } ";
|
ws.setDefaultFontSize(13);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
cssOverride += "body { "+align+"; font-size : 16px; } ";
|
ws.setDefaultFontSize(16);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
cssOverride += "body { "+align+"; font-size : 20px; } ";
|
ws.setDefaultFontSize(18);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user