From da483e12a6a3608f1ddf41eff5eaee903137cba7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 16 Oct 2013 20:22:55 +0400 Subject: [PATCH] different workaround for webview flicker --- src/org/fox/ttrss/ArticleFragment.java | 5 ++++- src/org/fox/ttrss/offline/OfflineArticleFragment.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index ea1a1205..04e503b5 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -18,6 +18,7 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; +import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; @@ -209,7 +210,9 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl } else { cssOverride = "body { background : transparent; }"; } - web.setBackgroundColor(getResources().getColor(android.R.color.transparent)); + + // seriously? + web.setBackgroundColor(Color.argb(1, 0, 0, 0)); String hexColor = String.format("#%06X", (0xFFFFFF & tv.data)); cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}"; diff --git a/src/org/fox/ttrss/offline/OfflineArticleFragment.java b/src/org/fox/ttrss/offline/OfflineArticleFragment.java index b8f60bd7..dd7dde5e 100644 --- a/src/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -19,6 +19,7 @@ import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; +import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; @@ -224,7 +225,8 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector. } else { cssOverride = "body { background : transparent; }"; } - web.setBackgroundColor(getResources().getColor(android.R.color.transparent)); + // seriously? + web.setBackgroundColor(Color.argb(1, 0, 0, 0)); String hexColor = String.format("#%06X", (0xFFFFFF & tv.data)); cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";