use proper link colors in webview (bump version)
This commit is contained in:
parent
2791bc46e9
commit
b28f00765e
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="55"
|
android:versionCode="56"
|
||||||
android:versionName="0.4.7" >
|
android:versionName="0.4.8" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="7" />
|
<uses-sdk android:minSdkVersion="7" />
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
|
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
|
<item name="linkColor">#5858F8</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkTheme" parent="android:Theme.Holo">
|
<style name="DarkTheme" parent="android:Theme.Holo">
|
||||||
@ -42,6 +43,7 @@
|
|||||||
<item name="headlineSelectedTextColor">@android:color/primary_text_dark</item>
|
<item name="headlineSelectedTextColor">@android:color/primary_text_dark</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
|
||||||
|
<item name="linkColor">#5858F8</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -19,6 +19,7 @@
|
|||||||
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
|
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
|
<item name="linkColor">#30B0E0</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkTheme" parent="android:Theme.Holo">
|
<style name="DarkTheme" parent="android:Theme.Holo">
|
||||||
@ -41,6 +42,7 @@
|
|||||||
<item name="headlineSelectedTextColor">@android:color/black</item>
|
<item name="headlineSelectedTextColor">@android:color/black</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
|
||||||
|
<item name="linkColor">#33b5e5</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -19,4 +19,5 @@
|
|||||||
<attr name="headlineSelectedTextColor" format="reference|color" />
|
<attr name="headlineSelectedTextColor" format="reference|color" />
|
||||||
<attr name="headlineExcerptTextColor" format="reference|color" />
|
<attr name="headlineExcerptTextColor" format="reference|color" />
|
||||||
<attr name="headlineSelectedExcerptTextColor" format="reference|color" />
|
<attr name="headlineSelectedExcerptTextColor" format="reference|color" />
|
||||||
|
<attr name="linkColor" format="reference|color" />
|
||||||
</resources>
|
</resources>
|
@ -20,6 +20,7 @@
|
|||||||
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
|
<item name="headlineSelectedTextColor">@android:color/primary_text_light</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_light</item>
|
||||||
|
<item name="linkColor">#5858F8</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkTheme" parent="android:Theme.Black.NoTitleBar">
|
<style name="DarkTheme" parent="android:Theme.Black.NoTitleBar">
|
||||||
@ -42,6 +43,7 @@
|
|||||||
<item name="headlineSelectedTextColor">@android:color/black</item>
|
<item name="headlineSelectedTextColor">@android:color/black</item>
|
||||||
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
|
<item name="headlineExcerptTextColor">@android:color/secondary_text_dark</item>
|
||||||
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
|
<item name="headlineSelectedExcerptTextColor">@android:color/black</item>
|
||||||
|
<item name="linkColor">#5858F8</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -15,6 +15,7 @@ import android.preference.PreferenceManager;
|
|||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -102,23 +103,19 @@ public class ArticleFragment extends Fragment {
|
|||||||
ws.setSupportZoom(true);
|
ws.setSupportZoom(true);
|
||||||
ws.setBuiltInZoomControls(true);
|
ws.setBuiltInZoomControls(true);
|
||||||
|
|
||||||
TypedValue tv = new TypedValue();
|
TypedValue tv = new TypedValue();
|
||||||
|
getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true);
|
||||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
|
||||||
getActivity().getTheme().resolveAttribute(android.R.attr.textColorLink, tv, true);
|
|
||||||
|
|
||||||
|
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||||
cssOverride = "body { background : black; color : #e0e0e0}";
|
cssOverride = "body { background : black; color : #e0e0e0}";
|
||||||
view.setBackgroundColor(android.R.color.black);
|
view.setBackgroundColor(android.R.color.black);
|
||||||
web.setBackgroundColor(android.R.color.black);
|
web.setBackgroundColor(android.R.color.black);
|
||||||
} else {
|
} else {
|
||||||
getActivity().getTheme().resolveAttribute(android.R.attr.textColorLinkInverse, tv, true);
|
|
||||||
|
|
||||||
cssOverride = "";
|
cssOverride = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int linkColor = tv.data;
|
|
||||||
String hexColor = String.format("#%06X", (0xFFFFFF & linkColor));
|
String hexColor = String.format("#%06X", (0xFFFFFF & tv.data));
|
||||||
|
|
||||||
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";
|
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";
|
||||||
|
|
||||||
String articleContent = m_article.content != null ? m_article.content : "";
|
String articleContent = m_article.content != null ? m_article.content : "";
|
||||||
|
@ -107,23 +107,19 @@ public class OfflineArticleFragment extends Fragment {
|
|||||||
ws.setSupportZoom(true);
|
ws.setSupportZoom(true);
|
||||||
ws.setBuiltInZoomControls(true);
|
ws.setBuiltInZoomControls(true);
|
||||||
|
|
||||||
TypedValue tv = new TypedValue();
|
TypedValue tv = new TypedValue();
|
||||||
|
getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true);
|
||||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
|
||||||
getActivity().getTheme().resolveAttribute(android.R.attr.textColorLink, tv, true);
|
|
||||||
|
|
||||||
|
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||||
cssOverride = "body { background : black; color : #e0e0e0}";
|
cssOverride = "body { background : black; color : #e0e0e0}";
|
||||||
view.setBackgroundColor(android.R.color.black);
|
view.setBackgroundColor(android.R.color.black);
|
||||||
web.setBackgroundColor(android.R.color.black);
|
web.setBackgroundColor(android.R.color.black);
|
||||||
} else {
|
} else {
|
||||||
getActivity().getTheme().resolveAttribute(android.R.attr.textColorLinkInverse, tv, true);
|
|
||||||
|
|
||||||
cssOverride = "";
|
cssOverride = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int linkColor = tv.data;
|
|
||||||
String hexColor = String.format("#%06X", (0xFFFFFF & linkColor));
|
String hexColor = String.format("#%06X", (0xFFFFFF & tv.data));
|
||||||
|
|
||||||
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";
|
cssOverride += " a:link {color: "+hexColor+";} a:visited { color: "+hexColor+";}";
|
||||||
|
|
||||||
String articleContent = m_cursor.getString(m_cursor.getColumnIndex("content"));
|
String articleContent = m_cursor.getString(m_cursor.getColumnIndex("content"));
|
||||||
|
Loading…
Reference in New Issue
Block a user