set webview acceleration to software to prevent background flicker on
ics
This commit is contained in:
parent
7cff2fe3c0
commit
3a7273972b
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fox.ttrss"
|
||||
android:versionCode="56"
|
||||
android:versionName="0.4.8" >
|
||||
android:versionCode="57"
|
||||
android:versionName="0.4.9" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="7" />
|
||||
|
||||
|
@ -98,23 +98,24 @@ public class ArticleFragment extends Fragment {
|
||||
String content;
|
||||
String cssOverride = "";
|
||||
|
||||
|
||||
WebSettings ws = web.getSettings();
|
||||
ws.setSupportZoom(true);
|
||||
ws.setBuiltInZoomControls(true);
|
||||
|
||||
TypedValue tv = new TypedValue();
|
||||
getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true);
|
||||
|
||||
// prevent flicker in ics
|
||||
web.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
|
||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||
cssOverride = "body { background : black; color : #e0e0e0}";
|
||||
view.setBackgroundColor(android.R.color.black);
|
||||
web.setBackgroundColor(android.R.color.black);
|
||||
cssOverride = "body { background : transparent; color : #e0e0e0}";
|
||||
//view.setBackgroundColor(android.R.color.black);
|
||||
web.setBackgroundColor(android.R.color.transparent);
|
||||
} else {
|
||||
cssOverride = "";
|
||||
}
|
||||
|
||||
|
||||
String hexColor = String.format("#%06X", (0xFFFFFF & tv.data));
|
||||
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";
|
||||
|
||||
|
@ -102,23 +102,24 @@ public class OfflineArticleFragment extends Fragment {
|
||||
String content;
|
||||
String cssOverride = "";
|
||||
|
||||
|
||||
WebSettings ws = web.getSettings();
|
||||
ws.setSupportZoom(true);
|
||||
ws.setBuiltInZoomControls(true);
|
||||
|
||||
TypedValue tv = new TypedValue();
|
||||
getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true);
|
||||
|
||||
// prevent flicker in ics
|
||||
web.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
|
||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||
cssOverride = "body { background : black; color : #e0e0e0}";
|
||||
view.setBackgroundColor(android.R.color.black);
|
||||
web.setBackgroundColor(android.R.color.black);
|
||||
cssOverride = "body { background : transparent; color : #e0e0e0}";
|
||||
//view.setBackgroundColor(android.R.color.black);
|
||||
web.setBackgroundColor(android.R.color.transparent);
|
||||
} else {
|
||||
cssOverride = "";
|
||||
}
|
||||
|
||||
|
||||
String hexColor = String.format("#%06X", (0xFFFFFF & tv.data));
|
||||
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user