├── .idea ├── .name ├── dictionaries │ └── zzk.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── app ├── .gitignore ├── libs │ └── jsoup-1.8.3.jar ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── avator.jpg │ │ │ │ ├── ic_launcher.png │ │ │ │ └── bg_banner_dialog.jpg │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_discuss.png │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ ├── selectable_background.xml │ │ │ │ ├── side_nav_bar.xml │ │ │ │ └── activated_background.xml │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── drawables.xml │ │ │ │ ├── arrays.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-v21 │ │ │ │ ├── ic_menu_send.xml │ │ │ │ ├── ic_menu_slideshow.xml │ │ │ │ ├── ic_menu_gallery.xml │ │ │ │ ├── ic_menu_manage.xml │ │ │ │ ├── ic_menu_camera.xml │ │ │ │ └── ic_menu_share.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── menu │ │ │ │ ├── main.xml │ │ │ │ └── activity_main_drawer.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_test.xml │ │ │ │ ├── view_footer.xml │ │ │ │ ├── fragment_content_list.xml │ │ │ │ ├── toolbar_layout.xml │ │ │ │ ├── view_image_list_item.xml │ │ │ │ ├── fragment_image_list.xml │ │ │ │ ├── fragment_image.xml │ │ │ │ ├── view_pull_load_more.xml │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── fragment_content.xml │ │ │ │ ├── view_content_list.xml │ │ │ │ ├── fragment_images.xml │ │ │ │ ├── nav_header_main.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ └── activity_personal.xml │ │ ├── java │ │ │ └── lico │ │ │ │ └── example │ │ │ │ ├── presenter │ │ │ │ ├── IPresenter.java │ │ │ │ ├── FragmentPresenter.java │ │ │ │ └── ActivityPresenter.java │ │ │ │ ├── listener │ │ │ │ ├── JSONParserCompleteListener.java │ │ │ │ └── HttpApi.java │ │ │ │ ├── bean │ │ │ │ ├── HttpResponseEntity.java │ │ │ │ ├── JcodeInfo.java │ │ │ │ ├── ResponseImagesListEntity.java │ │ │ │ └── ImagesListEntity.java │ │ │ │ ├── adapter │ │ │ │ ├── SimpleRecyclerAdapter.java │ │ │ │ ├── ContentPagerAdapter.java │ │ │ │ ├── TabFragmentPagerAdapter.java │ │ │ │ ├── BaseAdapterHelper.java │ │ │ │ └── BaseQuickAdapter.java │ │ │ │ ├── view │ │ │ │ ├── IView.java │ │ │ │ ├── ViewImpl.java │ │ │ │ ├── ImagesView.java │ │ │ │ ├── PersonalView.java │ │ │ │ ├── ContentView.java │ │ │ │ ├── ContentlistView.java │ │ │ │ ├── ImageListView.java │ │ │ │ └── MainView.java │ │ │ │ ├── ui │ │ │ │ ├── PersonalActivity.java │ │ │ │ ├── SpaceImageDetailActivity.java │ │ │ │ └── MainActivity.java │ │ │ │ ├── helper │ │ │ │ ├── GenericHelper.java │ │ │ │ └── EventHelper.java │ │ │ │ ├── views │ │ │ │ ├── SwipeRefreshLayoutOnRefresh.java │ │ │ │ ├── SpacesItemDecoration.java │ │ │ │ ├── SuperRecyclerView.java │ │ │ │ ├── RecyclerViewOnScroll.java │ │ │ │ ├── PLAImageView.java │ │ │ │ ├── PullLoadMoreRecyclerView.java │ │ │ │ └── SmoothImageView.java │ │ │ │ ├── app │ │ │ │ └── EApplication.java │ │ │ │ ├── utils │ │ │ │ ├── DataUtil.java │ │ │ │ └── BitmapUtil.java │ │ │ │ └── fragment │ │ │ │ ├── ImageFragment.java │ │ │ │ ├── ContentFragment.java │ │ │ │ ├── LazyFragment.java │ │ │ │ ├── ImageListFragment.java │ │ │ │ └── ContentListFragment.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── lico │ │ │ └── example │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── lico │ │ └── example │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── README.md ├── gradle.properties ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | MVPExample -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/libs/jsoup-1.8.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/libs/jsoup-1.8.3.jar -------------------------------------------------------------------------------- /.idea/dictionaries/zzk.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/avator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-xhdpi/avator.jpg -------------------------------------------------------------------------------- /.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/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_discuss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-xxhdpi/ic_discuss.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/bg_banner_dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzkong/MVPExample/HEAD/app/src/main/res/mipmap-xhdpi/bg_banner_dialog.jpg -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/lico/example/presenter/IPresenter.java: -------------------------------------------------------------------------------- 1 | package lico.example.presenter; 2 | 3 | /** 4 | * Created by zzk on 15/11/27. 5 | */ 6 | public interface IPresenter { 7 | Class getViewClass(); 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/drawable/selectable_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MVPExample 3 | 4 | Open navigation drawer 5 | Close navigation drawer 6 | 7 | Settings 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/lico/example/listener/JSONParserCompleteListener.java: -------------------------------------------------------------------------------- 1 | package lico.example.listener; 2 | 3 | 4 | import lico.example.bean.HttpResponseEntity; 5 | 6 | /** 7 | * Created by zwl on 15/7/27. 8 | */ 9 | public interface JSONParserCompleteListener { 10 | public void ParserCompleteListener(HttpResponseEntity response, Object object); 11 | } 12 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MVPExample 2 | 改良版MVP的demo; 涉及技术MVP activity模型、fragment模型(懒加载) 、retrofit 2.0 rxjava简单应用 3 | 4 | 项目中图片资源参考了简阅代码https://github.com/SkillCollege/SimplifyReader 5 | 6 | 因为电脑丢失:有些参考资料已经不记得了; 7 | 8 | 参考资料:http://kymjs.com/code/2015/11/09/01/ 9 | 10 | http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0915/3460.html 11 | 12 | https://github.com/lzyzsd/Awesome-RxJava中各种 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_send.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/lico/example/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package lico.example; 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/androidTest/java/lico/example/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package lico.example; 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/java/lico/example/bean/HttpResponseEntity.java: -------------------------------------------------------------------------------- 1 | package lico.example.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by zwl on 15/7/27. 7 | */ 8 | public class HttpResponseEntity implements Serializable { 9 | public int responseCode; 10 | public String errorMsg; 11 | 12 | public HttpResponseEntity(int responseCode, String errorMsg) { 13 | this.responseCode = responseCode; 14 | this.errorMsg = errorMsg; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 |