fix article text color when using system theme

This commit is contained in:
Andrew Dolgov 2013-10-15 18:53:05 +04:00
parent dedd069a90
commit 688c22fe92
2 changed files with 8 additions and 4 deletions

View File

@ -204,9 +204,11 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
TypedValue tv = new TypedValue();
getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true);
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
String theme = m_prefs.getString("theme", "THEME_DARK");
if ("THEME_DARK".equals(theme) || "THEME_SYSTEM".equals(theme)) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK_GRAY")) {
} else if ("THEME_DARK_GRAY".equals(theme)) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else {
cssOverride = "body { background : transparent; }";

View File

@ -216,9 +216,11 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
web.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
String theme = m_prefs.getString("theme", "THEME_DARK");
if ("THEME_DARK".equals(theme) || "THEME_SYSTEM".equals(theme)) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK_GRAY")) {
} else if ("THEME_DARK_GRAY".equals(theme)) {
cssOverride = "body { background : transparent; color : #e0e0e0}";
} else {
cssOverride = "body { background : transparent; }";