├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ └── layout │ │ │ │ ├── content_main.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── sunzxy │ │ │ │ └── frescoplus │ │ │ │ ├── App.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── sunzxy │ │ │ └── frescoplus │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── sunzxy │ │ └── frescoplus │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── frescopluslib ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── sunzxy │ │ │ │ └── frescopluslib │ │ │ │ ├── request │ │ │ │ ├── callback │ │ │ │ │ ├── FPFetchCallback.java │ │ │ │ │ ├── FPCacheCallback.java │ │ │ │ │ └── FPLoadCallback.java │ │ │ │ ├── supplier │ │ │ │ │ ├── BaseProcessorSupplier.java │ │ │ │ │ ├── FPProgressBarDrawable.java │ │ │ │ │ └── FetchImageControllerListenerSupplier.java │ │ │ │ ├── Fetcher.java │ │ │ │ └── impl │ │ │ │ │ ├── AbsBaseFetcher.java │ │ │ │ │ └── FrescoPlusFetcher.java │ │ │ │ ├── exception │ │ │ │ ├── FPNullPointerException.java │ │ │ │ ├── FPIllegalArgumentException.java │ │ │ │ └── FPRuntimeException.java │ │ │ │ ├── core │ │ │ │ ├── FrescoPriority.java │ │ │ │ ├── FrescoUri.java │ │ │ │ ├── DefaultConfigCentre.java │ │ │ │ ├── FrescoPlusCore.java │ │ │ │ ├── FrescoCacheStatsTracker.java │ │ │ │ ├── FrescoPlusConfig.java │ │ │ │ └── FrescoCacheManager.java │ │ │ │ ├── logger │ │ │ │ ├── FrescoLogger.java │ │ │ │ └── FrescoLogTracker.java │ │ │ │ ├── widget │ │ │ │ └── FrescoPlusView.java │ │ │ │ ├── util │ │ │ │ ├── DiskCacheUtil.java │ │ │ │ ├── ParamCheckUtil.java │ │ │ │ └── UriUtil.java │ │ │ │ └── FrescoPlusInitializer.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── sunzxy │ │ └── frescopluslib │ │ └── ApplicationTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── README.md └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /frescopluslib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':frescopluslib' 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sunzxyong/FrescoPlus/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /frescopluslib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FrescoPlusLib 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sunzxyong/FrescoPlus/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sunzxyong/FrescoPlus/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sunzxyong/FrescoPlus/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sunzxyong/FrescoPlus/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sunzxyong/FrescoPlus/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | FrescoPlus 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/request/callback/FPFetchCallback.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.request.callback; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/10. 5 | */ 6 | public interface FPFetchCallback { 7 | 8 | void onSuccess(T result); 9 | 10 | void onFailure(Throwable throwable); 11 | } 12 | -------------------------------------------------------------------------------- /frescopluslib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/request/callback/FPCacheCallback.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.request.callback; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/12. 5 | */ 6 | public interface FPCacheCallback { 7 | /** 8 | * @param result The result of the image was found in disk cache. 9 | */ 10 | void onResult(T result); 11 | } 12 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/exception/FPNullPointerException.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.exception; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/9. 5 | */ 6 | public class FPNullPointerException extends NullPointerException { 7 | 8 | public FPNullPointerException(String detailMessage) { 9 | super(detailMessage); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/exception/FPIllegalArgumentException.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.exception; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/9. 5 | */ 6 | public class FPIllegalArgumentException extends IllegalArgumentException { 7 | public FPIllegalArgumentException(String detailMessage) { 8 | super(detailMessage); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/com/sunzxy/frescoplus/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescoplus; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/request/callback/FPLoadCallback.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.request.callback; 2 | 3 | import android.net.Uri; 4 | 5 | /** 6 | * Created by zhengxiaoyong on 16/1/10. 7 | */ 8 | public interface FPLoadCallback { 9 | 10 | void onSuccess(Uri uri, T result); 11 | 12 | void onFailure(Uri uri, Throwable throwable); 13 | 14 | void onCancel(Uri uri); 15 | } 16 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/core/FrescoPriority.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.core; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/10. 5 | */ 6 | public final class FrescoPriority { 7 | /** 8 | * Will be the first to perform. 9 | */ 10 | public static final int HIGH = 0x101; 11 | /** 12 | * after the HIGH priority. 13 | */ 14 | public static final int LOW = 0x100; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/sunzxy/frescoplus/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescoplus; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /frescopluslib/src/androidTest/java/com/sunzxy/frescopluslib/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/exception/FPRuntimeException.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.exception; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/10. 5 | */ 6 | public class FPRuntimeException extends RuntimeException { 7 | public FPRuntimeException(String detailMessage) { 8 | super(detailMessage); 9 | } 10 | 11 | public FPRuntimeException(String detailMessage, Throwable throwable) { 12 | super(detailMessage, throwable); 13 | initCause(throwable); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Log Files 26 | *.log 27 | 28 | # Android Studio Navigation editor temp files 29 | .navigation/ 30 | 31 | # Android Studio captures folder 32 | captures/ 33 | *.iml 34 | gradlew 35 | gradlew.bat 36 | .idea 37 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/core/FrescoUri.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.core; 2 | 3 | /** 4 | * Created by zhengxiaoyong on 16/1/9. 5 | */ 6 | public final class FrescoUri { 7 | public static final String HTTP_SCHEME = "http"; 8 | public static final String HTTPS_SCHEME = "https"; 9 | public static final String LOCAL_FILE_SCHEME = "file"; 10 | public static final String LOCAL_CONTENT_SCHEME = "content"; 11 | public static final String LOCAL_ASSET_SCHEME = "asset"; 12 | public static final String LOCAL_RESOURCE_SCHEME = "res"; 13 | public static final String DATA_SCHEME = "data"; 14 | } 15 | -------------------------------------------------------------------------------- /frescopluslib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | android { 3 | compileSdkVersion 23 4 | buildToolsVersion "23.0.2" 5 | defaultConfig { 6 | minSdkVersion 15 7 | targetSdkVersion 23 8 | versionCode 1 9 | versionName "1.0" 10 | } 11 | buildTypes { 12 | release { 13 | minifyEnabled false 14 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 15 | } 16 | } 17 | } 18 | 19 | dependencies { 20 | compile fileTree(include: ['*.jar'], dir: 'libs') 21 | compile 'com.facebook.fresco:fresco:0.8.1' 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /frescopluslib/src/main/java/com/sunzxy/frescopluslib/request/supplier/BaseProcessorSupplier.java: -------------------------------------------------------------------------------- 1 | package com.sunzxy.frescopluslib.request.supplier; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import com.facebook.imagepipeline.request.BasePostprocessor; 6 | 7 | /** 8 | * Created by zhengxiaoyong on 16/1/10. 9 | */ 10 | public abstract class BaseProcessorSupplier extends BasePostprocessor { 11 | @Override 12 | public String getName() { 13 | return "BaseProcessorSupplier"; 14 | } 15 | 16 | @Override 17 | public void process(Bitmap bitmap) { 18 | super.process(bitmap); 19 | processBitmap(bitmap); 20 | } 21 | 22 | public abstract void processBitmap(Bitmap bitmap); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Sunzxyong/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /frescopluslib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Sunzxyong/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |