offline article: allow mixed content to enable showing cached images on LP+

This commit is contained in:
Andrew Dolgov 2015-11-23 14:19:41 +03:00
parent 9ad2955c6c
commit a2f248a238
3 changed files with 13 additions and 8 deletions

View File

@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
android { android {
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion "22.0.1" buildToolsVersion "23"
defaultConfig { defaultConfig {
applicationId "org.fox.ttrss" applicationId "org.fox.ttrss"
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 21 targetSdkVersion 23
} }
lintOptions { lintOptions {
@ -29,10 +29,10 @@ dependencies {
compile files('libs/dashclock-api-r1.1.jar') compile files('libs/dashclock-api-r1.1.jar')
compile files('libs/jsoup-1.6.1.jar') compile files('libs/jsoup-1.6.1.jar')
compile files('libs/universal-image-loader-1.9.3.jar') compile files('libs/universal-image-loader-1.9.3.jar')
compile 'com.android.support:cardview-v7:23.0.0' compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:support-v4:23.0.0' compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.code.gson:gson:2.3' compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:appcompat-v7:23.0.0' compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.shamanland:fab:0.0.5' compile 'com.shamanland:fab:0.0.5'
compile 'ch.acra:acra:4.5.0' compile 'ch.acra:acra:4.5.0'
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar' compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'

View File

@ -1,12 +1,12 @@
<?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="378" android:versionCode="379"
android:versionName="1.150" > android:versionName="1.151" >
<uses-sdk <uses-sdk
android:minSdkVersion="15" android:minSdkVersion="15"
android:targetSdkVersion="21" /> android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

View File

@ -290,6 +290,11 @@ public class OfflineArticleFragment extends Fragment {
WebSettings ws = web.getSettings(); WebSettings ws = web.getSettings();
ws.setSupportZoom(false); ws.setSupportZoom(false);
// we need to show "insecure" file:// urls
if (m_prefs.getBoolean("offline_image_cache_enabled", false)) {
ws.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
TypedValue tvBackground = new TypedValue(); TypedValue tvBackground = new TypedValue();
getActivity().getTheme().resolveAttribute(R.attr.articleBackground, tvBackground, true); getActivity().getTheme().resolveAttribute(R.attr.articleBackground, tvBackground, true);