├── RxJavaRetrofit ├── settings.gradle ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── loading_01.png │ │ │ │ │ ├── loading_02.png │ │ │ │ │ ├── loading_03.png │ │ │ │ │ ├── loading_04.png │ │ │ │ │ ├── loading_05.png │ │ │ │ │ ├── loading_06.png │ │ │ │ │ ├── loading_07.png │ │ │ │ │ ├── loading_08.png │ │ │ │ │ ├── loading_09.png │ │ │ │ │ ├── loading_10.png │ │ │ │ │ ├── loading_11.png │ │ │ │ │ └── loading_12.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ ├── loading_bg_drawable.xml │ │ │ │ │ └── loading_animal.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── loading_layout.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── ywl5320 │ │ │ │ │ └── rxjavaretrofit │ │ │ │ │ ├── httpservice │ │ │ │ │ ├── beans │ │ │ │ │ │ ├── UserBean.java │ │ │ │ │ │ └── WeatherBean.java │ │ │ │ │ ├── subscribers │ │ │ │ │ │ ├── SubscriberOnListener.java │ │ │ │ │ │ ├── ResponStatusCode.java │ │ │ │ │ │ └── HttpSubscriber.java │ │ │ │ │ ├── service │ │ │ │ │ │ ├── ExceptionApi.java │ │ │ │ │ │ ├── BaseApi.java │ │ │ │ │ │ └── HttpMethod.java │ │ │ │ │ ├── serviceapi │ │ │ │ │ │ ├── UserService.java │ │ │ │ │ │ └── UserApi.java │ │ │ │ │ └── httpentity │ │ │ │ │ │ └── HttpResult.java │ │ │ │ │ ├── MyApplication.java │ │ │ │ │ ├── dialog │ │ │ │ │ └── LoadDialog.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── utils │ │ │ │ │ └── NetUtil.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── ywl5320 │ │ │ │ └── rxjavaretrofit │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── ywl5320 │ │ │ └── rxjavaretrofit │ │ │ └── ApplicationTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── RxJava2Retrofit2Okhttp3 └── RxJavaRetrofit │ ├── settings.gradle │ ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── loading_01.png │ │ │ │ │ ├── loading_02.png │ │ │ │ │ ├── loading_03.png │ │ │ │ │ ├── loading_04.png │ │ │ │ │ ├── loading_05.png │ │ │ │ │ ├── loading_06.png │ │ │ │ │ ├── loading_07.png │ │ │ │ │ ├── loading_08.png │ │ │ │ │ ├── loading_09.png │ │ │ │ │ ├── loading_10.png │ │ │ │ │ ├── loading_11.png │ │ │ │ │ └── loading_12.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ ├── loading_bg_drawable.xml │ │ │ │ │ └── loading_animal.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── loading_layout.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── ywl5320 │ │ │ │ │ └── rxjavaretrofit │ │ │ │ │ ├── httpservice │ │ │ │ │ ├── beans │ │ │ │ │ │ ├── UserBean.java │ │ │ │ │ │ └── WeatherBean.java │ │ │ │ │ ├── subscribers │ │ │ │ │ │ ├── SubscriberOnListener.java │ │ │ │ │ │ ├── ResponStatusCode.java │ │ │ │ │ │ └── HttpSubscriber.java │ │ │ │ │ ├── service │ │ │ │ │ │ ├── ExceptionApi.java │ │ │ │ │ │ ├── BaseApi.java │ │ │ │ │ │ └── HttpMethod.java │ │ │ │ │ ├── serviceapi │ │ │ │ │ │ ├── UserService.java │ │ │ │ │ │ └── UserApi.java │ │ │ │ │ └── httpentity │ │ │ │ │ │ └── HttpResult.java │ │ │ │ │ ├── MyApplication.java │ │ │ │ │ ├── dialog │ │ │ │ │ └── LoadDialog.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── utils │ │ │ │ │ └── NetUtil.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── ywl5320 │ │ │ │ └── rxjavaretrofit │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── ywl5320 │ │ │ └── rxjavaretrofit │ │ │ └── ApplicationTest.java │ ├── proguard-rules.pro │ └── build.gradle │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── build.gradle │ ├── gradle.properties │ ├── gradlew.bat │ └── gradlew ├── imgs └── weather.gif ├── .gitignore ├── README.md └── LICENSE /RxJavaRetrofit/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /imgs/weather.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/imgs/weather.gif -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RxJavaRetrofit 3 | 4 | -------------------------------------------------------------------------------- /RxJavaRetrofit/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RxJavaRetrofit 3 | 4 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_01.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_02.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_03.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_04.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_05.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_06.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_07.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_08.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_09.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_10.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_11.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_12.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJavaRetrofit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_01.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_02.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_03.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_04.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_05.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_06.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_07.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_08.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_09.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_10.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_11.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xhdpi/loading_12.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ywl5320/RxjavaRetrofit/HEAD/RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/beans/UserBean.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.beans; 2 | 3 | /** 4 | * Created by ywl on 2016/6/24. 5 | */ 6 | public class UserBean { 7 | } 8 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/beans/UserBean.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.beans; 2 | 3 | /** 4 | * Created by ywl on 2016/6/24. 5 | */ 6 | public class UserBean { 7 | } 8 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /RxJavaRetrofit/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 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/beans/WeatherBean.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.beans; 2 | 3 | /** 4 | * Created by ywl on 2016/6/26. 5 | */ 6 | public class WeatherBean { 7 | private int status; 8 | private String message; 9 | } 10 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/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-3.3-all.zip 7 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/beans/WeatherBean.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.beans; 2 | 3 | /** 4 | * Created by ywl on 2016/6/26. 5 | */ 6 | public class WeatherBean { 7 | private int status; 8 | private String message; 9 | } 10 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/subscribers/SubscriberOnListener.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.subscribers; 2 | 3 | /** 4 | * Created by ywl on 2016/5/19. 5 | */ 6 | public interface SubscriberOnListener { 7 | 8 | void onSucceed(T data); 9 | 10 | void onError(int code, String msg); 11 | } 12 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/subscribers/SubscriberOnListener.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.subscribers; 2 | 3 | /** 4 | * Created by ywl on 2016/5/19. 5 | */ 6 | public interface SubscriberOnListener { 7 | 8 | void onSucceed(T data); 9 | 10 | void onError(int code, String msg); 11 | } 12 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/drawable/loading_bg_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/drawable/loading_bg_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/test/java/com/ywl5320/rxjavaretrofit/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit; 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 | } -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/test/java/com/ywl5320/rxjavaretrofit/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit; 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 | } -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/androidTest/java/com/ywl5320/rxjavaretrofit/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit; 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 | } -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/androidTest/java/com/ywl5320/rxjavaretrofit/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit; 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 | } -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit; 2 | 3 | import android.app.Application; 4 | 5 | /** 6 | * Created by ywl on 2016/6/24. 7 | */ 8 | public class MyApplication extends Application{ 9 | 10 | private static MyApplication instance; 11 | 12 | @Override 13 | public void onCreate() { 14 | super.onCreate(); 15 | instance = this; 16 | } 17 | 18 | public static MyApplication getInstance() { 19 | return instance; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit; 2 | 3 | import android.app.Application; 4 | 5 | /** 6 | * Created by ywl on 2016/6/24. 7 | */ 8 | public class MyApplication extends Application{ 9 | 10 | private static MyApplication instance; 11 | 12 | @Override 13 | public void onCreate() { 14 | super.onCreate(); 15 | instance = this; 16 | } 17 | 18 | public static MyApplication getInstance() { 19 | return instance; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /RxJavaRetrofit/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.1.2' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/service/ExceptionApi.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.service; 2 | 3 | 4 | /** 5 | * Created by ywl on 2016/5/19. 6 | */ 7 | public class ExceptionApi extends RuntimeException{ 8 | 9 | private int code; 10 | private String msg; 11 | 12 | public ExceptionApi(int resultCode, String msg) { 13 | this.code = resultCode; 14 | this.msg = msg; 15 | } 16 | 17 | public int getCode() { 18 | return code; 19 | } 20 | 21 | public String getMsg() { 22 | return msg; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/subscribers/ResponStatusCode.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.subscribers; 2 | 3 | /** 4 | * Created by ywl on 2016/6/21. 5 | */ 6 | public class ResponStatusCode { 7 | 8 | /** 9 | * 判断code 是否成功 10 | * @param code 11 | * @return 12 | */ 13 | public static String getCode(int code, String msg){ 14 | if(code == 1){ 15 | return "1"; 16 | } 17 | else if(code == -1){ 18 | return "参数不合法"; 19 | }else{ 20 | return msg; 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.3.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/service/ExceptionApi.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.service; 2 | 3 | 4 | /** 5 | * Created by ywl on 2016/5/19. 6 | */ 7 | public class ExceptionApi extends RuntimeException{ 8 | 9 | private int code; 10 | private String msg; 11 | 12 | public ExceptionApi(int resultCode, String msg) { 13 | this.code = resultCode; 14 | this.msg = msg; 15 | } 16 | 17 | public int getCode() { 18 | return code; 19 | } 20 | 21 | public String getMsg() { 22 | return msg; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | 39 | # Keystore files 40 | *.jks 41 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/subscribers/ResponStatusCode.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.subscribers; 2 | 3 | /** 4 | * Created by ywl on 2016/6/21. 5 | */ 6 | public class ResponStatusCode { 7 | 8 | /** 9 | * 判断code 是否成功 10 | * @param code 11 | * @return 12 | */ 13 | public static String getCode(int code, String msg){ 14 | if(code == 1){ 15 | return "1"; 16 | } 17 | else if(code == -1){ 18 | return "参数不合法"; 19 | }else{ 20 | return msg; 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /RxJavaRetrofit/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 D:\Android\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 | -------------------------------------------------------------------------------- /RxJava2Retrofit2Okhttp3/RxJavaRetrofit/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 D:\Android\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 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/java/com/ywl5320/rxjavaretrofit/httpservice/serviceapi/UserService.java: -------------------------------------------------------------------------------- 1 | package com.ywl5320.rxjavaretrofit.httpservice.serviceapi; 2 | 3 | 4 | import com.ywl5320.rxjavaretrofit.httpservice.beans.WeatherBean; 5 | import com.ywl5320.rxjavaretrofit.httpservice.httpentity.HttpResult; 6 | 7 | 8 | import retrofit2.http.POST; 9 | import retrofit2.http.Query; 10 | import rx.Observable; 11 | 12 | /** 13 | * Created by ywl on 2016/5/19. 14 | */ 15 | public interface UserService { 16 | 17 | /** 18 | * 获取百度天气数据 19 | * @param location 20 | * @param output 21 | * @param ak 22 | * @return 23 | */ 24 | @POST("telematics/v3/weather") 25 | Observable> getWeather(@Query("location") String location, @Query("output") String output, @Query("ak") String ak); 26 | } 27 | -------------------------------------------------------------------------------- /RxJavaRetrofit/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 |