├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── cover.jpg │ │ │ │ └── rating_bar_bg.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── rating_small_empty.png │ │ │ │ ├── rating_small_full.png │ │ │ │ └── rating_small_half.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── movie_fragment.xml │ │ │ │ └── movie_item.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── jc │ │ │ │ └── mvvmrxjavaretrofitsample │ │ │ │ ├── view │ │ │ │ ├── CompletedListener.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MovieAdapter.java │ │ │ │ └── MovieFragment.java │ │ │ │ ├── model │ │ │ │ ├── data │ │ │ │ │ ├── DouBanMovieService.java │ │ │ │ │ └── RetrofitHelper.java │ │ │ │ └── entity │ │ │ │ │ ├── Response.java │ │ │ │ │ └── Movie.java │ │ │ │ └── viewModel │ │ │ │ ├── MovieViewModel.java │ │ │ │ └── MainViewModel.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── jc │ │ │ └── mvvmrxjavaretrofitsample │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── jc │ │ └── mvvmrxjavaretrofitsample │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── settings.gradle ├── demo.apk ├── image └── sample.gif ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | MVVMRxJavaRetrofitSample -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /demo.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/demo.apk -------------------------------------------------------------------------------- /image/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/image/sample.gif -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/drawable/cover.jpg -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/rating_small_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-xhdpi/rating_small_empty.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/rating_small_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-xhdpi/rating_small_full.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/rating_small_half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/githubhaohao/MVVMRxJavaRetrofitSample/HEAD/app/src/main/res/mipmap-xhdpi/rating_small_half.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MVVMRxJavaRetrofitSample 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/jc/mvvmrxjavaretrofitsample/view/CompletedListener.java: -------------------------------------------------------------------------------- 1 | package com.jc.mvvmrxjavaretrofitsample.view; 2 | 3 | /** 4 | * Created by HaohaoChang on 2017/2/12. 5 | */ 6 | public interface CompletedListener { 7 | void onCompleted(); 8 | } 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 21 11:34:03 PDT 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.8-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #36506C 4 | #233142 5 | #A5DEF1 6 | #EBF7FD 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/test/java/com/jc/mvvmrxjavaretrofitsample/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.jc.mvvmrxjavaretrofitsample; 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 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/rating_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/jc/mvvmrxjavaretrofitsample/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.jc.mvvmrxjavaretrofitsample; 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 | } -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/jc/mvvmrxjavaretrofitsample/model/data/DouBanMovieService.java: -------------------------------------------------------------------------------- 1 | package com.jc.mvvmrxjavaretrofitsample.model.data; 2 | 3 | import com.jc.mvvmrxjavaretrofitsample.model.entity.Movie; 4 | import com.jc.mvvmrxjavaretrofitsample.model.entity.Response; 5 | 6 | import java.util.List; 7 | 8 | import retrofit2.http.GET; 9 | import retrofit2.http.Query; 10 | import rx.Observable; 11 | 12 | /** 13 | * Created by HaohaoChang on 2017/2/11. 14 | */ 15 | public interface DouBanMovieService { 16 | String BASE_URL = "https://api.douban.com/v2/movie/"; 17 | 18 | @GET("top250") 19 | Observable>> getMovies(@Query("start") int start, @Query("count") int count); 20 | } 21 | -------------------------------------------------------------------------------- /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 K:\AndroidSDK/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 |