├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── WangYi.xml ├── gradle.xml ├── misc.xml ├── modules.xml └── runConfigurations.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── wangyi │ │ └── demo │ │ ├── ExampleInstrumentedTest.java │ │ ├── UnitTest.java │ │ └── UnitTestActivityInstrumentationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── wangyi │ │ │ └── demo │ │ │ ├── AppIml.java │ │ │ ├── MainActivity.java │ │ │ ├── NetWorkUtil.java │ │ │ ├── User.java │ │ │ ├── UserList.java │ │ │ └── cache │ │ │ ├── CacheCallback.java │ │ │ ├── CacheInterceptor.java │ │ │ ├── CacheManager.java │ │ │ ├── DiskLruCache.java │ │ │ ├── EnhancedCacheInterceptor.java │ │ │ ├── EnhancedCall.java │ │ │ └── EnhancedCallback.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── 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-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── wangyi │ └── demo │ ├── ExampleUnitTest.java │ └── demo │ └── CalculatorTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.gitignore -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/compiler.xml -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/copyright/profiles_settings.xml -------------------------------------------------------------------------------- /.idea/dictionaries/WangYi.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/dictionaries/WangYi.xml -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/gradle.xml -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/misc.xml -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/modules.xml -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/.idea/runConfigurations.xml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CacheUtil4Retrofit 2 | 给Retrofit添加离线缓存的Demo,支持Post请求 3 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/build.gradle -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/proguard-rules.pro -------------------------------------------------------------------------------- /app/src/androidTest/java/com/wangyi/demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/androidTest/java/com/wangyi/demo/ExampleInstrumentedTest.java -------------------------------------------------------------------------------- /app/src/androidTest/java/com/wangyi/demo/UnitTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/androidTest/java/com/wangyi/demo/UnitTest.java -------------------------------------------------------------------------------- /app/src/androidTest/java/com/wangyi/demo/UnitTestActivityInstrumentationTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/androidTest/java/com/wangyi/demo/UnitTestActivityInstrumentationTest.java -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/AndroidManifest.xml -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/AppIml.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/AppIml.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/MainActivity.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/MainActivity.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/NetWorkUtil.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/NetWorkUtil.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/User.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/User.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/UserList.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/UserList.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/CacheCallback.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/CacheCallback.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/CacheInterceptor.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/CacheInterceptor.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/CacheManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/CacheManager.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/DiskLruCache.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/DiskLruCache.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/EnhancedCacheInterceptor.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/EnhancedCacheInterceptor.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/EnhancedCall.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/EnhancedCall.java -------------------------------------------------------------------------------- /app/src/main/java/com/wangyi/demo/cache/EnhancedCallback.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/java/com/wangyi/demo/cache/EnhancedCallback.java -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/layout/activity_main.xml -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/values-w820dp/dimens.xml -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/values/colors.xml -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/values/dimens.xml -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/values/strings.xml -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/main/res/values/styles.xml -------------------------------------------------------------------------------- /app/src/test/java/com/wangyi/demo/ExampleUnitTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/test/java/com/wangyi/demo/ExampleUnitTest.java -------------------------------------------------------------------------------- /app/src/test/java/com/wangyi/demo/demo/CalculatorTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/app/src/test/java/com/wangyi/demo/demo/CalculatorTest.java -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/gradle.properties -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/CacheUtil4Retrofit/HEAD/gradlew.bat -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------