├── .gitignore ├── .idea ├── gradle.xml ├── misc.xml ├── modules.xml └── runConfigurations.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── commons-codec-1.10-sources.jar │ ├── juniversalchardet-1.0.3.jar │ ├── umeng-analytics-v6.1.1.jar │ └── utdid4all-1.0.4.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── monke │ │ └── monkeybook │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── monke │ │ │ └── monkeybook │ │ │ ├── BitIntentDataManager.java │ │ │ ├── ErrorAnalyContentManager.java │ │ │ ├── MApplication.java │ │ │ ├── ProxyManager.java │ │ │ ├── ReadBookControl.java │ │ │ ├── base │ │ │ ├── MBaseActivity.java │ │ │ ├── MBaseModelImpl.java │ │ │ ├── ProxyInterceptor.java │ │ │ └── observer │ │ │ │ ├── SimpleObserClass.java │ │ │ │ └── SimpleObserver.java │ │ │ ├── bean │ │ │ ├── BookContentBean.java │ │ │ ├── BookInfoBean.java │ │ │ ├── BookShelfBean.java │ │ │ ├── ChapterListBean.java │ │ │ ├── DownloadChapterBean.java │ │ │ ├── DownloadChapterListBean.java │ │ │ ├── LibraryBean.java │ │ │ ├── LibraryKindBookListBean.java │ │ │ ├── LibraryNewBookBean.java │ │ │ ├── LocBookShelfBean.java │ │ │ ├── ReadBookContentBean.java │ │ │ ├── SearchBookBean.java │ │ │ ├── SearchHistoryBean.java │ │ │ ├── WebChapterBean.java │ │ │ └── WebContentBean.java │ │ │ ├── cache │ │ │ └── ACache.java │ │ │ ├── common │ │ │ ├── RxBusTag.java │ │ │ └── api │ │ │ │ ├── IEasouApi.java │ │ │ │ ├── IGxwztvApi.java │ │ │ │ └── ILingdiankanshuApi.java │ │ │ ├── dao │ │ │ ├── BookContentBeanDao.java │ │ │ ├── BookInfoBeanDao.java │ │ │ ├── BookShelfBeanDao.java │ │ │ ├── ChapterListBeanDao.java │ │ │ ├── DaoMaster.java │ │ │ ├── DaoSession.java │ │ │ ├── DbHelper.java │ │ │ ├── DownloadChapterBeanDao.java │ │ │ └── SearchHistoryBeanDao.java │ │ │ ├── listener │ │ │ └── OnGetChapterListListener.java │ │ │ ├── model │ │ │ ├── IEasouBookModel.java │ │ │ ├── IGxwztvBookModel.java │ │ │ ├── IImportBookModel.java │ │ │ ├── IStationBookModel.java │ │ │ ├── IWebBookModel.java │ │ │ ├── IWebContentModel.java │ │ │ └── impl │ │ │ │ ├── Content17duxsModelImpl.java │ │ │ │ ├── Content17kModelImpl.java │ │ │ │ ├── Content3dllcModelImpl.java │ │ │ │ ├── Content44pqModelImpl.java │ │ │ │ ├── Content630bookCCModelImpl.java │ │ │ │ ├── Content92zwModelImpl.java │ │ │ │ ├── ContentAszwModelImpl.java │ │ │ │ ├── ContentBaishukuModelImpl.java │ │ │ │ ├── ContentBxwx9ModelImpl.java │ │ │ │ ├── ContentCommendModelImpl.java │ │ │ │ ├── ContentDhzwModelImpl.java │ │ │ │ ├── ContentEasouModelImpl.java │ │ │ │ ├── ContentFuheishuModelImpl.java │ │ │ │ ├── ContentKewaishuModelImpl.java │ │ │ │ ├── ContentLeduwoModelImpl.java │ │ │ │ ├── ContentLewen8ModelImpl.java │ │ │ │ ├── ContentPbtxtModelImpl.java │ │ │ │ ├── ContentPpxsModelImpl.java │ │ │ │ ├── ContentQulaModelImpl.java │ │ │ │ ├── ContentQzreadModelImpl.java │ │ │ │ ├── ContentRanwenaModelImpl.java │ │ │ │ ├── ContentShulouModelImpl.java │ │ │ │ ├── ContentSnwx8ModelImpl.java │ │ │ │ ├── ContentSuimengModelImpl.java │ │ │ │ ├── ContentSyzwwModelImpl.java │ │ │ │ ├── ContentVodtwModelImpl.java │ │ │ │ ├── ContentWxguanModelImpl.java │ │ │ │ ├── ContentXqingdouCCModelImpl.java │ │ │ │ ├── ContentXqingdouModelImpl.java │ │ │ │ ├── ContentYb3ModelImpl.java │ │ │ │ ├── ContentZhulangModelImpl.java │ │ │ │ ├── GxwztvBookModelImpl.java │ │ │ │ ├── ImportBookModelImpl.java │ │ │ │ ├── LingdiankanshuStationBookModelImpl.java │ │ │ │ └── WebBookModelImpl.java │ │ │ ├── presenter │ │ │ ├── IBookDetailPresenter.java │ │ │ ├── IBookReadPresenter.java │ │ │ ├── IChoiceBookPresenter.java │ │ │ ├── IImportBookPresenter.java │ │ │ ├── ILibraryPresenter.java │ │ │ ├── IMainPresenter.java │ │ │ ├── ISearchPresenter.java │ │ │ └── impl │ │ │ │ ├── BookDetailPresenterImpl.java │ │ │ │ ├── ChoiceBookPresenterImpl.java │ │ │ │ ├── ImportBookPresenterImpl.java │ │ │ │ ├── LibraryPresenterImpl.java │ │ │ │ ├── MainPresenterImpl.java │ │ │ │ ├── ReadBookPresenterImpl.java │ │ │ │ └── SearchPresenterImpl.java │ │ │ ├── service │ │ │ └── DownloadService.java │ │ │ ├── utils │ │ │ ├── BlurTransformation.java │ │ │ ├── DensityUtil.java │ │ │ ├── NetworkUtil.java │ │ │ ├── NumberUtil.java │ │ │ ├── ParseSystemUtil.java │ │ │ ├── PremissionCheck.java │ │ │ ├── aes │ │ │ │ ├── AESUtil.java │ │ │ │ └── InsecureSHA1PRNGKeyDerivator.java │ │ │ └── base64 │ │ │ │ ├── BASE64Decoder.java │ │ │ │ ├── BASE64Encoder.java │ │ │ │ ├── CEFormatException.java │ │ │ │ ├── CEStreamExhausted.java │ │ │ │ ├── CharacterDecoder.java │ │ │ │ └── CharacterEncoder.java │ │ │ ├── view │ │ │ ├── IBookDetailView.java │ │ │ ├── IBookReadView.java │ │ │ ├── IChoiceBookView.java │ │ │ ├── IImportBookView.java │ │ │ ├── ILibraryView.java │ │ │ ├── IMainView.java │ │ │ ├── ISearchView.java │ │ │ ├── adapter │ │ │ │ ├── BookShelfAdapter.java │ │ │ │ ├── ChapterListAdapter.java │ │ │ │ ├── ChoiceBookAdapter.java │ │ │ │ ├── ImportBookAdapter.java │ │ │ │ ├── SearchBookAdapter.java │ │ │ │ └── SearchHistoryAdapter.java │ │ │ ├── impl │ │ │ │ ├── BookDetailActivity.java │ │ │ │ ├── ChoiceBookActivity.java │ │ │ │ ├── ImportBookActivity.java │ │ │ │ ├── LibraryActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── ReadBookActivity.java │ │ │ │ ├── SearchActivity.java │ │ │ │ └── WelcomeActivity.java │ │ │ └── popupwindow │ │ │ │ ├── CheckAddShelfPop.java │ │ │ │ ├── DownloadListPop.java │ │ │ │ ├── FontPop.java │ │ │ │ ├── MoreSettingPop.java │ │ │ │ ├── ProxyPop.java │ │ │ │ ├── ReadBookMenuMorePop.java │ │ │ │ └── WindowLightPop.java │ │ │ └── widget │ │ │ ├── ChapterListView.java │ │ │ ├── MTextView.java │ │ │ ├── RecyclerViewBar.java │ │ │ ├── checkbox │ │ │ └── SmoothCheckBox.java │ │ │ ├── contentswitchview │ │ │ ├── BookContentView.java │ │ │ └── ContentSwitchView.java │ │ │ ├── flowlayout │ │ │ ├── FlowLayout.java │ │ │ ├── TagAdapter.java │ │ │ ├── TagFlowLayout.java │ │ │ └── TagView.java │ │ │ ├── libraryview │ │ │ ├── LibraryKindBookAdapter.java │ │ │ ├── LibraryKindBookListView.java │ │ │ ├── LibraryKindBookView.java │ │ │ ├── LibraryNewBooksAdapter.java │ │ │ └── LibraryNewBooksView.java │ │ │ ├── modialog │ │ │ ├── MoProgressHUD.java │ │ │ └── MoProgressView.java │ │ │ └── refreshview │ │ │ ├── BaseRefreshListener.java │ │ │ ├── OnLoadMoreListener.java │ │ │ ├── OnRefreshWithProgressListener.java │ │ │ ├── RefreshProgressBar.java │ │ │ ├── RefreshRecyclerView.java │ │ │ ├── RefreshRecyclerViewAdapter.java │ │ │ └── RefreshScrollView.java │ └── res │ │ ├── anim │ │ ├── anim_act_importbook_in.xml │ │ ├── anim_act_importbook_out.xml │ │ ├── anim_bookshelf_item.xml │ │ ├── anim_pop_chapterlist_in.xml │ │ ├── anim_pop_chapterlist_out.xml │ │ ├── anim_pop_checkaddshelf_in.xml │ │ ├── anim_pop_checkaddshelf_out.xml │ │ ├── anim_pop_moresetting_in.xml │ │ ├── anim_pop_moresetting_out.xml │ │ ├── anim_pop_windowlight_in.xml │ │ ├── anim_pop_windowlight_out.xml │ │ ├── anim_pop_windowmenumore_in.xml │ │ ├── anim_pop_windowmenumore_out.xml │ │ ├── anim_readbook_bottom_in.xml │ │ ├── anim_readbook_bottom_out.xml │ │ ├── anim_readbook_top_in.xml │ │ ├── anim_readbook_top_out.xml │ │ ├── moprogress_bottom_in.xml │ │ ├── moprogress_bottom_out.xml │ │ ├── moprogress_in.xml │ │ ├── moprogress_in_bottom_right.xml │ │ ├── moprogress_in_top_right.xml │ │ ├── moprogress_out.xml │ │ ├── moprogress_out_bottom_right.xml │ │ └── moprogress_out_top_right.xml │ │ ├── color │ │ └── selector_kind_tv_color.xml │ │ ├── drawable-v21 │ │ ├── bg_ib_pre.xml │ │ ├── bg_ib_pre2.xml │ │ └── bg_ib_pre3.xml │ │ ├── drawable-xxhdpi │ │ ├── bg_btn_watch_nor.png │ │ ├── bg_btn_watch_sel.png │ │ ├── bg_readbook_black.png │ │ ├── bg_readbook_green.png │ │ ├── bg_readbook_yellow.png │ │ ├── bg_search.9.png │ │ ├── bg_shadow.png │ │ ├── bg_shadow2.png │ │ ├── bg_welcome.png │ │ ├── icon_add_nor.png │ │ ├── icon_add_sel.png │ │ ├── icon_catalog_nor.png │ │ ├── icon_catalog_pre.png │ │ ├── icon_close.png │ │ ├── icon_cursor.png │ │ ├── icon_download.png │ │ ├── icon_download_main_nor.png │ │ ├── icon_download_main_pre.png │ │ ├── icon_font_nor.png │ │ ├── icon_font_pre.png │ │ ├── icon_library_nor.png │ │ ├── icon_library_sel.png │ │ ├── icon_light_nor.png │ │ ├── icon_light_pre.png │ │ ├── icon_money_nor.png │ │ ├── icon_money_sel.png │ │ ├── icon_monkovel_big_black.png │ │ ├── icon_monkovel_big_white.png │ │ ├── icon_monkovel_black.png │ │ ├── icon_monkovel_white.png │ │ ├── icon_more_nor.png │ │ ├── icon_more_pre.png │ │ ├── icon_readbook_black.png │ │ ├── icon_readbook_green.png │ │ ├── icon_readbook_white.png │ │ ├── icon_readbook_yellow.png │ │ ├── icon_return_nor.png │ │ ├── icon_return_pre.png │ │ ├── icon_search_nor.png │ │ ├── icon_search_sel.png │ │ ├── icon_select.png │ │ ├── icon_setting_main_nor.png │ │ ├── icon_setting_main_pre.png │ │ ├── icon_setting_nor.png │ │ ├── icon_setting_pre.png │ │ ├── icon_slider.png │ │ ├── icon_text.png │ │ ├── img_cover_default.9.png │ │ ├── img_shelf_lastest.png │ │ ├── img_shelf_lastest_tips.png │ │ └── img_shelf_other.png │ │ ├── drawable │ │ ├── bg_edit.xml │ │ ├── bg_ib_pre.xml │ │ ├── bg_ib_pre2.xml │ │ ├── bg_ib_pre3.xml │ │ ├── bg_search_content.xml │ │ ├── moprogress_bg_white.xml │ │ ├── selector_bg_download.xml │ │ ├── selector_bg_download_cancel.xml │ │ ├── selector_bg_watch.xml │ │ ├── selector_book_detail_read_bg.xml │ │ ├── selector_book_detail_shelf_bg.xml │ │ ├── selector_icon_catalog.xml │ │ ├── selector_icon_donwload_main.xml │ │ ├── selector_icon_font.xml │ │ ├── selector_icon_light.xml │ │ ├── selector_icon_more.xml │ │ ├── selector_icon_return.xml │ │ ├── selector_icon_setting.xml │ │ ├── selector_icon_setting_main.xml │ │ ├── selector_importbook_btn_bg.xml │ │ ├── selector_iv_add.xml │ │ ├── selector_iv_library.xml │ │ ├── selector_iv_money.xml │ │ ├── selector_iv_search.xml │ │ ├── selector_pop_font_bg.xml │ │ ├── selector_pop_font_color.xml │ │ ├── selector_switchbutton.xml │ │ ├── selector_tv_addshelf.xml │ │ ├── selector_tv_addshelf_text.xml │ │ ├── selector_tv_black.xml │ │ ├── selector_tv_green.xml │ │ ├── selector_tv_rank_kind.xml │ │ ├── selector_tv_rank_kind_color.xml │ │ ├── shape_bg_download_cancel_nor.xml │ │ ├── shape_bg_download_cancel_pre.xml │ │ ├── shape_bg_download_nor.xml │ │ ├── shape_bg_download_pre.xml │ │ ├── shape_bg_readbook_black.xml │ │ ├── shape_bg_readbook_green.xml │ │ ├── shape_bg_readbook_white.xml │ │ ├── shape_bg_readbook_yellow.xml │ │ ├── shape_pop_checkaddshelf_bg.xml │ │ ├── shape_pop_font_bg_nor.xml │ │ ├── shape_pop_font_bg_pre.xml │ │ ├── shape_progress_cursor_read.xml │ │ ├── shape_search_history_roundrect.xml │ │ ├── shape_search_history_roundrect_disable.xml │ │ ├── shape_search_history_roundrect_press.xml │ │ └── shape_text_cursor.xml │ │ ├── layout │ │ ├── activity_bookchoice.xml │ │ ├── activity_bookread.xml │ │ ├── activity_detail.xml │ │ ├── activity_importbook.xml │ │ ├── activity_library.xml │ │ ├── activity_main.xml │ │ ├── activity_search.xml │ │ ├── activity_welcome.xml │ │ ├── adapter_bookshelf_lastest.xml │ │ ├── adapter_bookshelf_other.xml │ │ ├── adapter_content_switch_item.xml │ │ ├── adapter_library_hotauthor_item.xml │ │ ├── adapter_library_kindbook.xml │ │ ├── adapter_searchbook_item.xml │ │ ├── adapter_searchhistory_item.xml │ │ ├── moprogress_dialog_downloadchoice.xml │ │ ├── moprogress_dialog_infor.xml │ │ ├── moprogress_dialog_loading.xml │ │ ├── moprogress_dialog_two.xml │ │ ├── view_adapter_chapterlist.xml │ │ ├── view_adapter_importbook.xml │ │ ├── view_chapterlist.xml │ │ ├── view_kind.xml │ │ ├── view_library_hotauthor.xml │ │ ├── view_library_kindbook.xml │ │ ├── view_pop_checkaddshelf.xml │ │ ├── view_pop_downloadlist.xml │ │ ├── view_pop_font.xml │ │ ├── view_pop_menumore.xml │ │ ├── view_pop_moresetting.xml │ │ ├── view_pop_proxy.xml │ │ ├── view_pop_windowlight.xml │ │ ├── view_refresh_loadmore.xml │ │ ├── view_refresh_recyclerview.xml │ │ ├── view_searchbook_nodata.xml │ │ └── view_searchbook_refresherror.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 │ │ ├── attr.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml │ └── test │ └── java │ └── com │ └── monke │ └── monkeybook │ └── ExampleUnitTest.java ├── basemvplib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── monke │ │ └── basemvplib │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── monke │ │ │ └── basemvplib │ │ │ ├── AppActivityManager.java │ │ │ ├── BaseApplication.java │ │ │ ├── EncodoConverter.java │ │ │ ├── IPresenter.java │ │ │ ├── IView.java │ │ │ └── impl │ │ │ ├── BaseActivity.java │ │ │ ├── BaseFragment.java │ │ │ ├── BaseModelImpl.java │ │ │ ├── BasePresenterImpl.java │ │ │ └── RetryIntercepter.java │ └── 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 │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── monke │ └── basemvplib │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MONKOVEL 2 | 一款可以优雅的阅读本地小说以及大量网络小说的APP 3 | # APP预览以及体验 4 | http://blog.csdn.net/github_38075367/article/details/76255230 5 | # 项目基本介绍 6 | http://blog.csdn.net/github_38075367/article/details/77075477 7 | # 8 | 你要商业?不建议,盗版小说请勿传播,仅供学习使用。
9 | 你要修改?请修改我的Logo/应用名,移除预留QQ,修改包名,谢谢 10 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/libs/commons-codec-1.10-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/libs/commons-codec-1.10-sources.jar -------------------------------------------------------------------------------- /app/libs/juniversalchardet-1.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/libs/juniversalchardet-1.0.3.jar -------------------------------------------------------------------------------- /app/libs/umeng-analytics-v6.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/libs/umeng-analytics-v6.1.1.jar -------------------------------------------------------------------------------- /app/libs/utdid4all-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/libs/utdid4all-1.0.4.jar -------------------------------------------------------------------------------- /app/src/androidTest/java/com/monke/monkeybook/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook; 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/com/monke/monkeybook/BitIntentDataManager.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook; 3 | 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | public class BitIntentDataManager { 8 | public static Map bigData; 9 | 10 | private static BitIntentDataManager instance = null; 11 | 12 | public static BitIntentDataManager getInstance(){ 13 | if(instance == null){ 14 | synchronized (BitIntentDataManager.class){ 15 | if(instance == null){ 16 | instance = new BitIntentDataManager(); 17 | } 18 | } 19 | } 20 | return instance; 21 | } 22 | 23 | private BitIntentDataManager(){ 24 | bigData = new HashMap<>(); 25 | } 26 | public Object getData(String key){ 27 | return bigData.get(key); 28 | } 29 | public void putData(String key,Object data){ 30 | bigData.put(key,data); 31 | } 32 | public void cleanData(String key){ 33 | bigData.remove(key); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/MApplication.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook; 3 | 4 | import android.app.Application; 5 | import android.content.Intent; 6 | import android.content.pm.ApplicationInfo; 7 | import android.content.pm.PackageManager; 8 | import com.monke.monkeybook.service.DownloadService; 9 | import com.umeng.analytics.MobclickAgent; 10 | 11 | public class MApplication extends Application { 12 | 13 | private static MApplication instance; 14 | 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | if (BuildConfig.IS_RELEASE) { 19 | String channel = "debug"; 20 | try { 21 | ApplicationInfo appInfo = getPackageManager() 22 | .getApplicationInfo(getPackageName(), 23 | PackageManager.GET_META_DATA); 24 | channel = appInfo.metaData.getString("UMENG_CHANNEL_VALUE"); 25 | } catch (PackageManager.NameNotFoundException e) { 26 | e.printStackTrace(); 27 | } 28 | MobclickAgent.startWithConfigure(new MobclickAgent.UMAnalyticsConfig(this, getString(R.string.umeng_key), channel, MobclickAgent.EScenarioType.E_UM_NORMAL, true)); 29 | } 30 | instance = this; 31 | ProxyManager.initProxy(); 32 | startService(new Intent(this, DownloadService.class)); 33 | } 34 | 35 | public static MApplication getInstance() { 36 | return instance; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/base/MBaseActivity.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.base; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | import com.monke.basemvplib.impl.BaseActivity; 6 | import com.umeng.analytics.MobclickAgent; 7 | 8 | public abstract class MBaseActivity extends BaseActivity{ 9 | @Override 10 | protected void onResume() { 11 | super.onResume(); 12 | MobclickAgent.onResume(this); 13 | } 14 | 15 | @Override 16 | protected void onPause() { 17 | super.onPause(); 18 | MobclickAgent.onPause(this); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/base/MBaseModelImpl.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.base; 2 | 3 | import com.monke.basemvplib.EncodoConverter; 4 | import com.monke.basemvplib.impl.RetryIntercepter; 5 | 6 | import java.util.concurrent.TimeUnit; 7 | 8 | import okhttp3.OkHttpClient; 9 | import retrofit2.Retrofit; 10 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; 11 | import retrofit2.converter.scalars.ScalarsConverterFactory; 12 | 13 | public class MBaseModelImpl { 14 | protected OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() 15 | .connectTimeout(10, TimeUnit.SECONDS) 16 | .writeTimeout(10, TimeUnit.SECONDS) 17 | .readTimeout(10, TimeUnit.SECONDS) 18 | .addInterceptor(new ProxyInterceptor()); 19 | 20 | protected Retrofit getRetrofitObject(String url) { 21 | return new Retrofit.Builder().baseUrl(url) 22 | //增加返回值为字符串的支持(以实体类返回) 23 | .addConverterFactory(ScalarsConverterFactory.create()) 24 | //增加返回值为Oservable的支持 25 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 26 | .client(clientBuilder.build()) 27 | .build(); 28 | } 29 | 30 | protected Retrofit getRetrofitString(String url, String encode) { 31 | return new Retrofit.Builder().baseUrl(url) 32 | //增加返回值为字符串的支持(以实体类返回) 33 | .addConverterFactory(EncodoConverter.create(encode)) 34 | //增加返回值为Oservable的支持 35 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 36 | .client(clientBuilder.build()) 37 | .build(); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/base/ProxyInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.base; 2 | 3 | import com.monke.monkeybook.ProxyManager; 4 | import com.monke.monkeybook.utils.aes.AESUtil; 5 | 6 | import org.jsoup.helper.StringUtil; 7 | 8 | import java.io.IOException; 9 | import java.net.URLEncoder; 10 | import java.util.UUID; 11 | 12 | import okhttp3.HttpUrl; 13 | import okhttp3.Interceptor; 14 | import okhttp3.Request; 15 | import okhttp3.Response; 16 | 17 | public class ProxyInterceptor implements Interceptor { 18 | public ProxyInterceptor() { 19 | } 20 | 21 | @Override 22 | public Response intercept(Chain chain) throws IOException { 23 | Request oldRequest = chain.request(); 24 | if (ProxyManager.hasProxy()) { //如果是代理模式则优先请求代理服务器,失败再自行本地请求 25 | //获取request的创建者builder 26 | Request.Builder builder = oldRequest.newBuilder(); 27 | String oldUrl = oldRequest.url().toString(); 28 | if (!StringUtil.isBlank(oldUrl)) { 29 | oldUrl = URLEncoder.encode(oldUrl, "utf-8"); 30 | } 31 | try { 32 | String temp = ProxyManager.packageName + UUID.randomUUID().toString() + System.currentTimeMillis(); 33 | String key = AESUtil.aesEncode(temp.trim(), ProxyManager.PROXY_PACKAGENAME_ENCODE); 34 | try { 35 | key = URLEncoder.encode(key,"utf-8"); 36 | } catch (Exception e) { 37 | key = temp.trim(); 38 | } 39 | HttpUrl newBaseUrl = HttpUrl.parse(ProxyManager.proxyHttp).newBuilder() 40 | .setQueryParameter("proxyUrl", oldUrl) 41 | .setQueryParameter("proxyPackagename", key) 42 | .build(); 43 | Response response = chain.proceed(builder.url(newBaseUrl).build()); 44 | if (response.isSuccessful()) { 45 | return response; 46 | } 47 | } catch (Exception e) { 48 | 49 | } 50 | } 51 | Response oldResponse = chain.proceed(oldRequest); 52 | return oldResponse; 53 | } 54 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/base/observer/SimpleObserClass.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.base.observer; 3 | 4 | import com.monke.monkeybook.utils.NetworkUtil; 5 | 6 | public class SimpleObserClass { 7 | private int code; 8 | private T t; 9 | 10 | public SimpleObserClass(T t){ 11 | this(t,NetworkUtil.SUCCESS); 12 | } 13 | 14 | public SimpleObserClass(T t,int code){ 15 | this.t = t; 16 | this.code = code; 17 | } 18 | 19 | public int getCode() { 20 | return code; 21 | } 22 | 23 | public void setCode(int code) { 24 | this.code = code; 25 | } 26 | 27 | public Boolean success(){ 28 | return code == NetworkUtil.SUCCESS; 29 | } 30 | 31 | public T getT() { 32 | return t; 33 | } 34 | 35 | public void setT(T t) { 36 | this.t = t; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/base/observer/SimpleObserver.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.base.observer; 3 | 4 | import io.reactivex.Observer; 5 | import io.reactivex.disposables.Disposable; 6 | 7 | public abstract class SimpleObserver implements Observer { 8 | 9 | @Override 10 | public void onSubscribe(Disposable d) { 11 | 12 | } 13 | 14 | @Override 15 | public void onComplete() { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/DownloadChapterListBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | import android.os.Parcel; 5 | import android.os.Parcelable; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * 下载章节列表 11 | */ 12 | public class DownloadChapterListBean implements Parcelable { 13 | private List data; 14 | 15 | public DownloadChapterListBean(List result) { 16 | this.data = result; 17 | } 18 | 19 | protected DownloadChapterListBean(Parcel in) { 20 | if(data == null) 21 | data = new ArrayList<>(); 22 | in.readTypedList(data,DownloadChapterBean.CREATOR); 23 | } 24 | 25 | public static final Creator CREATOR = new Creator() { 26 | @Override 27 | public DownloadChapterListBean createFromParcel(Parcel in) { 28 | return new DownloadChapterListBean(in); 29 | } 30 | 31 | @Override 32 | public DownloadChapterListBean[] newArray(int size) { 33 | return new DownloadChapterListBean[size]; 34 | } 35 | }; 36 | 37 | public List getData() { 38 | return data; 39 | } 40 | 41 | public void setData(List data) { 42 | this.data = data; 43 | } 44 | 45 | @Override 46 | public int describeContents() { 47 | return 0; 48 | } 49 | 50 | @Override 51 | public void writeToParcel(Parcel dest, int flags) { 52 | dest.writeTypedList(data); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/LibraryBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | import java.util.List; 5 | 6 | /** 7 | * 书城整体Data bean 8 | */ 9 | public class LibraryBean { 10 | private List libraryNewBooks; 11 | private List kindBooks; 12 | 13 | public List getLibraryNewBooks() { 14 | return libraryNewBooks; 15 | } 16 | 17 | public void setLibraryNewBooks(List libraryNewBooks) { 18 | this.libraryNewBooks = libraryNewBooks; 19 | } 20 | 21 | public List getKindBooks() { 22 | return kindBooks; 23 | } 24 | 25 | public void setKindBooks(List kindBooks) { 26 | this.kindBooks = kindBooks; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/LibraryKindBookListBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | import java.util.List; 5 | 6 | /** 7 | * 书城 书籍分类推荐列表 8 | */ 9 | public class LibraryKindBookListBean { 10 | private String kindName; 11 | private String kindUrl; 12 | private List books; 13 | 14 | public String getKindName() { 15 | return kindName; 16 | } 17 | 18 | public void setKindName(String kindName) { 19 | this.kindName = kindName; 20 | } 21 | 22 | public List getBooks() { 23 | return books; 24 | } 25 | 26 | public void setBooks(List books) { 27 | this.books = books; 28 | } 29 | 30 | public String getKindUrl() { 31 | return kindUrl; 32 | } 33 | 34 | public void setKindUrl(String kindUrl) { 35 | this.kindUrl = kindUrl; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/LibraryNewBookBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | public class LibraryNewBookBean { 5 | private String name; 6 | private String url; 7 | private String tag; 8 | private String orgin; 9 | 10 | public LibraryNewBookBean(String name, String url, String tag, String orgin) { 11 | this.name = name; 12 | this.url = url; 13 | this.tag = tag; 14 | this.orgin = orgin; 15 | } 16 | 17 | public String getOrgin() { 18 | return orgin; 19 | } 20 | 21 | public void setOrgin(String orgin) { 22 | this.orgin = orgin; 23 | } 24 | 25 | public String getTag() { 26 | return tag; 27 | } 28 | 29 | public void setTag(String tag) { 30 | this.tag = tag; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | 41 | public String getUrl() { 42 | return url; 43 | } 44 | 45 | public void setUrl(String url) { 46 | this.url = url; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/LocBookShelfBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | public class LocBookShelfBean { 5 | private Boolean isNew; 6 | private BookShelfBean bookShelfBean; 7 | 8 | public LocBookShelfBean(Boolean isNew,BookShelfBean bookShelfBean){ 9 | this.isNew = isNew; 10 | this.bookShelfBean = bookShelfBean; 11 | } 12 | 13 | public Boolean getNew() { 14 | return isNew; 15 | } 16 | 17 | public void setNew(Boolean aNew) { 18 | isNew = aNew; 19 | } 20 | 21 | public BookShelfBean getBookShelfBean() { 22 | return bookShelfBean; 23 | } 24 | 25 | public void setBookShelfBean(BookShelfBean bookShelfBean) { 26 | this.bookShelfBean = bookShelfBean; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/ReadBookContentBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | import java.util.List; 5 | 6 | public class ReadBookContentBean { 7 | private List bookContentList; 8 | private int pageIndex; 9 | 10 | public ReadBookContentBean(List bookContentList,int pageIndex){ 11 | this.bookContentList = bookContentList; 12 | this.pageIndex = pageIndex; 13 | } 14 | 15 | public List getBookContentList() { 16 | return bookContentList; 17 | } 18 | 19 | public void setBookContentList(List bookContentList) { 20 | this.bookContentList = bookContentList; 21 | } 22 | 23 | public int getPageIndex() { 24 | return pageIndex; 25 | } 26 | 27 | public void setPageIndex(int pageIndex) { 28 | this.pageIndex = pageIndex; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/SearchHistoryBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | import org.greenrobot.greendao.annotation.Entity; 5 | import org.greenrobot.greendao.annotation.Id; 6 | import org.greenrobot.greendao.annotation.Unique; 7 | import org.greenrobot.greendao.annotation.Generated; 8 | 9 | @Entity 10 | public class SearchHistoryBean { 11 | @Id(autoincrement = true) 12 | private Long id = null; 13 | private int type; 14 | private String content; 15 | private long date; 16 | public long getDate() { 17 | return this.date; 18 | } 19 | public void setDate(long date) { 20 | this.date = date; 21 | } 22 | public String getContent() { 23 | return this.content; 24 | } 25 | public void setContent(String content) { 26 | this.content = content; 27 | } 28 | public int getType() { 29 | return this.type; 30 | } 31 | public void setType(int type) { 32 | this.type = type; 33 | } 34 | public Long getId() { 35 | return this.id; 36 | } 37 | public void setId(Long id) { 38 | this.id = id; 39 | } 40 | 41 | public SearchHistoryBean(int type, String content, long date) { 42 | this.type = type; 43 | this.content = content; 44 | this.date = date; 45 | } 46 | @Generated(hash = 488115752) 47 | public SearchHistoryBean(Long id, int type, String content, long date) { 48 | this.id = id; 49 | this.type = type; 50 | this.content = content; 51 | this.date = date; 52 | } 53 | @Generated(hash = 1570282321) 54 | public SearchHistoryBean() { 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/WebChapterBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | public class WebChapterBean { 5 | private T data; 6 | 7 | private Boolean next; 8 | 9 | public WebChapterBean(T data,Boolean next){ 10 | this.data = data; 11 | this.next = next; 12 | } 13 | 14 | public T getData() { 15 | return data; 16 | } 17 | 18 | public void setData(T data) { 19 | this.data = data; 20 | } 21 | 22 | public Boolean getNext() { 23 | return next; 24 | } 25 | 26 | public void setNext(Boolean next) { 27 | this.next = next; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/bean/WebContentBean.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.bean; 3 | 4 | public class WebContentBean { 5 | private String url; 6 | private String content; 7 | 8 | public WebContentBean(String url,String content){ 9 | this.url = url; 10 | this.content = content; 11 | } 12 | 13 | public String getUrl() { 14 | return url; 15 | } 16 | 17 | public void setUrl(String url) { 18 | this.url = url; 19 | } 20 | 21 | public String getContent() { 22 | return content; 23 | } 24 | 25 | public void setContent(String content) { 26 | this.content = content; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/cache/ACache.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.cache; 3 | 4 | import android.content.Context; 5 | import android.content.SharedPreferences; 6 | 7 | /** 8 | * 本地缓存 因本缓存只缓存书库主页 所以使用SP有条件可以替换成别的 9 | */ 10 | public class ACache { 11 | private SharedPreferences preference; 12 | private ACache(Context ctx){ 13 | preference = ctx.getSharedPreferences("ACache",0); 14 | } 15 | 16 | public static ACache get(Context ctx) { 17 | return new ACache(ctx); 18 | } 19 | 20 | public void put(String key, String value) { 21 | try{ 22 | SharedPreferences.Editor editor = preference.edit(); 23 | editor.putString(key, value); 24 | editor.commit(); 25 | }catch (Exception e){ 26 | 27 | } 28 | } 29 | 30 | /** 31 | * 读取 String数据 32 | * 33 | * @param key 34 | * @return String 数据 35 | */ 36 | public String getAsString(String key) { 37 | try{ 38 | return preference.getString(key,null); 39 | }catch (Exception e){ 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/common/RxBusTag.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.common; 3 | 4 | public class RxBusTag { 5 | 6 | public final static String HAD_ADD_BOOK = "rxbus_add_book"; 7 | 8 | public final static String HAD_REMOVE_BOOK = "rxbus_remove_book"; 9 | 10 | public final static String UPDATE_BOOK_PROGRESS = "rxbus_update_book_progress"; 11 | 12 | public final static String PAUSE_DOWNLOAD_LISTENER = "rxbus_pause_download_listener"; 13 | 14 | public final static String PROGRESS_DOWNLOAD_LISTENER = "rxbus_progress_download_listener"; 15 | 16 | public final static String FINISH_DOWNLOAD_LISTENER = "rxbus_finish_download_listener"; 17 | 18 | public final static String PAUSE_DOWNLOAD = "rxbus_pause_download"; 19 | 20 | public final static String START_DOWNLOAD = "rxbus_start_download"; 21 | 22 | public final static String CANCEL_DOWNLOAD = "rxbus_cancel_download"; 23 | 24 | public final static String ADD_DOWNLOAD_TASK = "rxbus_add_download_task"; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/common/api/IEasouApi.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.common.api; 3 | 4 | import io.reactivex.Observable; 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Headers; 7 | import retrofit2.http.Url; 8 | 9 | /** 10 | * 宜搜小说API (质量太差 废弃) 11 | */ 12 | public interface IEasouApi { 13 | @GET 14 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 15 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 16 | "Accept-Charset:UTF-8", 17 | "Connection:close", 18 | "Cache-Control:no-cache"}) 19 | Observable getBookInfo(@Url String url); 20 | 21 | @GET 22 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 23 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 24 | "Accept-Charset:UTF-8", 25 | "Connection:close", 26 | "Cache-Control:no-cache"}) 27 | Observable searchBook(@Url String url); 28 | 29 | @GET 30 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 31 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 32 | "Accept-Charset:UTF-8", 33 | "Connection:close", 34 | "Cache-Control:no-cache"}) 35 | Observable getBookContent(@Url String url); 36 | 37 | @GET 38 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 39 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 40 | "Accept-Charset:UTF-8", 41 | "Connection:close", 42 | "Cache-Control:no-cache"}) 43 | Observable getChapterList(@Url String url); 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/common/api/ILingdiankanshuApi.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.common.api; 3 | 4 | import io.reactivex.Observable; 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Headers; 7 | import retrofit2.http.Query; 8 | import retrofit2.http.Url; 9 | 10 | public interface ILingdiankanshuApi { 11 | 12 | @GET 13 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 14 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 15 | "Accept-Charset:UTF-8", 16 | "Connection:close", 17 | "Cache-Control:no-cache"}) 18 | Observable getBookInfo(@Url String url); 19 | 20 | @GET("/cse/search") 21 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 22 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 23 | "Accept-Charset:UTF-8", 24 | "Connection:close", 25 | "Cache-Control:no-cache"}) 26 | Observable searchBook(@Query("q") String content, @Query("p") int page, @Query("s") String time); 27 | 28 | @GET 29 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 30 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 31 | "Accept-Charset:UTF-8", 32 | "Connection:close", 33 | "Cache-Control:no-cache"}) 34 | Observable getBookContent(@Url String url); 35 | 36 | @GET 37 | @Headers({"Accept:text/html,application/xhtml+xml,application/xml", 38 | "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3", 39 | "Accept-Charset:UTF-8", 40 | "Connection:close", 41 | "Cache-Control:no-cache"}) 42 | Observable getChapterList(@Url String url); 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/dao/DbHelper.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.dao; 3 | 4 | import android.database.sqlite.SQLiteDatabase; 5 | import com.monke.monkeybook.MApplication; 6 | 7 | public class DbHelper { 8 | private DaoMaster.DevOpenHelper mHelper; 9 | private SQLiteDatabase db; 10 | private DaoMaster mDaoMaster; 11 | private DaoSession mDaoSession; 12 | 13 | private DbHelper(){ 14 | mHelper = new DaoMaster.DevOpenHelper(MApplication.getInstance(), "monkebook_db", null); 15 | db = mHelper.getWritableDatabase(); 16 | // 注意:该数据库连接属于 DaoMaster,所以多个 Session 指的是相同的数据库连接。 17 | mDaoMaster = new DaoMaster(db); 18 | mDaoSession = mDaoMaster.newSession(); 19 | } 20 | 21 | private static DbHelper instance; 22 | 23 | public static DbHelper getInstance(){ 24 | if(null == instance){ 25 | synchronized (DbHelper.class){ 26 | if(null == instance){ 27 | instance = new DbHelper(); 28 | } 29 | } 30 | } 31 | return instance; 32 | } 33 | 34 | public DaoSession getmDaoSession() { 35 | return mDaoSession; 36 | } 37 | 38 | public SQLiteDatabase getDb() { 39 | return db; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/listener/OnGetChapterListListener.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.listener; 3 | 4 | import com.monke.monkeybook.bean.BookShelfBean; 5 | 6 | public interface OnGetChapterListListener { 7 | public void success(BookShelfBean bookShelfBean); 8 | public void error(); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/IEasouBookModel.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model; 3 | 4 | import com.monke.monkeybook.bean.BookContentBean; 5 | import com.monke.monkeybook.bean.BookShelfBean; 6 | import com.monke.monkeybook.bean.SearchBookBean; 7 | import com.monke.monkeybook.listener.OnGetChapterListListener; 8 | import java.util.List; 9 | import io.reactivex.Observable; 10 | 11 | public interface IEasouBookModel { 12 | /** 13 | * 搜索书籍 14 | */ 15 | Observable> searchBook(String content, int page, int rankKind); 16 | 17 | /** 18 | * 网络请求并解析书籍信息 19 | */ 20 | Observable getBookInfo(final BookShelfBean bookShelfBean); 21 | 22 | /** 23 | * 网络解析图书目录 24 | */ 25 | void getChapterList(final BookShelfBean bookShelfBean, OnGetChapterListListener getChapterListListener); 26 | 27 | /** 28 | * 章节缓存 29 | */ 30 | Observable getBookContent(final String durChapterUrl, final int durChapterIndex); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/IGxwztvBookModel.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model; 3 | 4 | import com.monke.monkeybook.bean.LibraryBean; 5 | import com.monke.monkeybook.bean.SearchBookBean; 6 | import com.monke.monkeybook.cache.ACache; 7 | import java.util.List; 8 | import io.reactivex.Observable; 9 | 10 | public interface IGxwztvBookModel extends IStationBookModel { 11 | 12 | Observable> getKindBook(String url, int page); 13 | 14 | /** 15 | * 获取主页信息 16 | */ 17 | Observable getLibraryData(ACache aCache); 18 | 19 | /** 20 | * 解析主页数据 21 | */ 22 | Observable analyLibraryData(String data); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/IImportBookModel.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model; 3 | 4 | import com.monke.monkeybook.bean.LocBookShelfBean; 5 | import java.io.File; 6 | import io.reactivex.Observable; 7 | 8 | public interface IImportBookModel { 9 | 10 | Observable importBook(File book); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/IStationBookModel.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model; 3 | 4 | import com.monke.monkeybook.bean.BookContentBean; 5 | import com.monke.monkeybook.bean.BookShelfBean; 6 | import com.monke.monkeybook.bean.SearchBookBean; 7 | import com.monke.monkeybook.listener.OnGetChapterListListener; 8 | import java.util.List; 9 | import io.reactivex.Observable; 10 | 11 | public interface IStationBookModel { 12 | 13 | /** 14 | * 搜索书籍 15 | */ 16 | Observable> searchBook(String content, int page); 17 | 18 | /** 19 | * 网络请求并解析书籍信息 20 | */ 21 | Observable getBookInfo(final BookShelfBean bookShelfBean); 22 | 23 | /** 24 | * 网络解析图书目录 25 | */ 26 | void getChapterList(final BookShelfBean bookShelfBean, OnGetChapterListListener getChapterListListener); 27 | 28 | /** 29 | * 章节缓存 30 | */ 31 | Observable getBookContent(final String durChapterUrl, final int durChapterIndex); 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/IWebBookModel.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model; 3 | 4 | import com.monke.monkeybook.bean.BookContentBean; 5 | import com.monke.monkeybook.bean.BookShelfBean; 6 | import com.monke.monkeybook.bean.SearchBookBean; 7 | import com.monke.monkeybook.listener.OnGetChapterListListener; 8 | import java.util.List; 9 | import io.reactivex.Observable; 10 | 11 | public interface IWebBookModel { 12 | /** 13 | * 网络请求并解析书籍信息 14 | */ 15 | Observable getBookInfo(final BookShelfBean bookShelfBean); 16 | 17 | /** 18 | * 网络解析图书目录 19 | */ 20 | void getChapterList(final BookShelfBean bookShelfBean,OnGetChapterListListener getChapterListListener); 21 | 22 | /** 23 | * 章节缓存 24 | */ 25 | Observable getBookContent(final String durChapterUrl, final int durChapterIndex, String tag); 26 | 27 | /** 28 | * 获取分类书籍 29 | */ 30 | Observable> getKindBook(String url,int page); 31 | /** 32 | * 其他站点资源整合搜索 33 | */ 34 | Observable> searchOtherBook(String content,int page,String tag); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/IWebContentModel.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model; 3 | 4 | public interface IWebContentModel { 5 | 6 | String analyBookcontent(String s,String realUrl) throws Exception; 7 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/Content17duxsModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class Content17duxsModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.17duxs.com"; 12 | 13 | public static Content17duxsModelImpl getInstance() { 14 | return new Content17duxsModelImpl(); 15 | } 16 | 17 | private Content17duxsModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/Content17kModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.Element; 8 | import org.jsoup.nodes.TextNode; 9 | import java.util.List; 10 | 11 | public class Content17kModelImpl implements IWebContentModel { 12 | public static final String TAG = "http://www.17k.com"; 13 | 14 | public static Content17kModelImpl getInstance() { 15 | return new Content17kModelImpl(); 16 | } 17 | 18 | private Content17kModelImpl() { 19 | 20 | } 21 | 22 | @Override 23 | public String analyBookcontent(String s, String realUrl) throws Exception { 24 | Document doc = Jsoup.parse(s); 25 | Element all = doc.getElementById("chapterContentWapper"); 26 | List contentEs = all.getAllElements().get(0).textNodes(); 27 | StringBuilder content = new StringBuilder(); 28 | for (int i = 0; i < contentEs.size(); i++) { 29 | String temp = contentEs.get(i).text().trim(); 30 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 31 | if (temp.length() > 0) { 32 | content.append("\u3000\u3000" + temp); 33 | if (i < contentEs.size() - 1) { 34 | content.append("\r\n"); 35 | } 36 | } 37 | } 38 | return content.toString(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/Content3dllcModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class Content3dllcModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.3dllc.cc"; 12 | 13 | public static Content3dllcModelImpl getInstance() { 14 | return new Content3dllcModelImpl(); 15 | } 16 | 17 | private Content3dllcModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/Content44pqModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class Content44pqModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.44pq.net"; 12 | 13 | public static Content44pqModelImpl getInstance() { 14 | return new Content44pqModelImpl(); 15 | } 16 | 17 | private Content44pqModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/Content630bookCCModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class Content630bookCCModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.630book.cc"; 12 | 13 | public static Content630bookCCModelImpl getInstance() { 14 | return new Content630bookCCModelImpl(); 15 | } 16 | 17 | private Content630bookCCModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/Content92zwModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class Content92zwModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.92zw.la"; 12 | 13 | public static Content92zwModelImpl getInstance() { 14 | return new Content92zwModelImpl(); 15 | } 16 | 17 | private Content92zwModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("contents").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentAszwModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentAszwModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.aszw.org"; 12 | 13 | public static ContentAszwModelImpl getInstance() { 14 | return new ContentAszwModelImpl(); 15 | } 16 | 17 | private ContentAszwModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("contents").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentBaishukuModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentBaishukuModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://baishuku.com"; 12 | 13 | public static ContentBaishukuModelImpl getInstance() { 14 | return new ContentBaishukuModelImpl(); 15 | } 16 | 17 | private ContentBaishukuModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentBxwx9ModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentBxwx9ModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.bxwx9.org"; 12 | 13 | public static ContentBxwx9ModelImpl getInstance() { 14 | return new ContentBxwx9ModelImpl(); 15 | } 16 | 17 | private ContentBxwx9ModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentCommendModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.ErrorAnalyContentManager; 5 | import com.monke.monkeybook.bean.BookContentBean; 6 | import org.jsoup.Jsoup; 7 | import org.jsoup.nodes.Document; 8 | import org.jsoup.nodes.TextNode; 9 | import java.util.List; 10 | 11 | public class ContentCommendModelImpl { 12 | 13 | public static ContentCommendModelImpl getInstance() { 14 | return new ContentCommendModelImpl(); 15 | } 16 | 17 | private ContentCommendModelImpl() { 18 | 19 | } 20 | public BookContentBean analyBookcontent(BookContentBean bookContentBean, String s, String realUrl) throws Exception { 21 | ErrorAnalyContentManager.getInstance().writeNewErrorUrl(realUrl); 22 | try{ 23 | Document doc = Jsoup.parse(s); 24 | List contentEs = doc.getElementById("content").textNodes(); 25 | StringBuilder content = new StringBuilder(); 26 | for (int i = 0; i < contentEs.size(); i++) { 27 | String temp = contentEs.get(i).text().trim(); 28 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 29 | if (temp.length() > 0) { 30 | content.append("\u3000\u3000" + temp); 31 | if (i < contentEs.size() - 1) { 32 | content.append("\r\n"); 33 | } 34 | } 35 | } 36 | bookContentBean.setDurCapterContent(content.toString()); 37 | }catch (Exception e){ 38 | e.printStackTrace(); 39 | bookContentBean.setDurCapterContent(realUrl.substring(0, realUrl.indexOf('/', 8)) + "站点暂时不支持解析,请反馈给Monke QQ:1105075896,半小时内解决,超级效率的程序员"); 40 | bookContentBean.setRight(false); 41 | } 42 | return bookContentBean; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentDhzwModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentDhzwModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.dhzw.org"; 12 | 13 | public static ContentDhzwModelImpl getInstance() { 14 | return new ContentDhzwModelImpl(); 15 | } 16 | 17 | private ContentDhzwModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("BookText").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + contentEs.get(i).text().trim().replaceAll(" ","")); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentEasouModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentEasouModelImpl implements IWebContentModel { 11 | public static final String TAG = "http://book.easou.com"; 12 | 13 | public static ContentEasouModelImpl getInstance(){ 14 | return new ContentEasouModelImpl(); 15 | } 16 | 17 | private ContentEasouModelImpl(){ 18 | 19 | } 20 | 21 | @Override 22 | public String analyBookcontent(String s, String realUrl) throws Exception{ 23 | Document doc = Jsoup.parse(s); 24 | List contentEs = doc.getElementsByClass("show").get(0).textNodes(); 25 | StringBuilder content = new StringBuilder(); 26 | for (int i = 0; i < contentEs.size(); i++) { 27 | String temp = contentEs.get(i).text().trim(); 28 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 29 | if (temp.length() > 0) { 30 | content.append("\u3000\u3000" + temp); 31 | if (i < contentEs.size() - 1) { 32 | content.append("\r\n"); 33 | } 34 | } 35 | } 36 | return content.toString(); 37 | } 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentFuheishuModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | /** 11 | * 站点有问题 未完全解析 12 | */ 13 | public class ContentFuheishuModelImpl implements IWebContentModel{ 14 | public static final String TAG = "http://fuheishu.com"; 15 | 16 | public static ContentFuheishuModelImpl getInstance(){ 17 | return new ContentFuheishuModelImpl(); 18 | } 19 | 20 | private ContentFuheishuModelImpl(){ 21 | 22 | } 23 | @Override 24 | public String analyBookcontent(String s, String realUrl) throws Exception{ 25 | Document doc = Jsoup.parse(s); 26 | String bookId = realUrl.substring(realUrl.indexOf("/",21)+1,realUrl.indexOf(".html")); 27 | List contentTNs = doc.getElementById("content"+bookId).textNodes(); 28 | StringBuilder stringBuilder = new StringBuilder(); 29 | for(int i=0;i 0) { 33 | stringBuilder.append("\u3000\u3000" + temp); 34 | if (i < contentTNs.size() - 1) { 35 | stringBuilder.append("\r\n"); 36 | } 37 | } 38 | } 39 | return stringBuilder.toString(); 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentKewaishuModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentKewaishuModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.kewaishu.org"; 12 | 13 | public static ContentKewaishuModelImpl getInstance() { 14 | return new ContentKewaishuModelImpl(); 15 | } 16 | 17 | private ContentKewaishuModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").getElementsByTag("p").get(0).textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentLeduwoModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentLeduwoModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://leduwo.com"; 12 | 13 | public static ContentLeduwoModelImpl getInstance() { 14 | return new ContentLeduwoModelImpl(); 15 | } 16 | 17 | private ContentLeduwoModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentLewen8ModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentLewen8ModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.lewen8.com"; 12 | 13 | public static ContentLewen8ModelImpl getInstance() { 14 | return new ContentLewen8ModelImpl(); 15 | } 16 | 17 | private ContentLewen8ModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentPbtxtModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentPbtxtModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.pbtxt.com"; 12 | 13 | public static ContentPbtxtModelImpl getInstance(){ 14 | return new ContentPbtxtModelImpl(); 15 | } 16 | 17 | private ContentPbtxtModelImpl(){ 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception{ 22 | Document doc = Jsoup.parse(s); 23 | String bookId = realUrl.substring(realUrl.indexOf("/",21)+1,realUrl.indexOf(".html")); 24 | List contentTNs = doc.getElementById("content"+bookId).textNodes(); 25 | StringBuilder stringBuilder = new StringBuilder(); 26 | for(int i=0;i 0) { 30 | stringBuilder.append("\u3000\u3000" + temp); 31 | if (i < contentTNs.size() - 1) { 32 | stringBuilder.append("\r\n"); 33 | } 34 | } 35 | } 36 | return stringBuilder.toString(); 37 | } 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentPpxsModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentPpxsModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.ppxs.net"; 12 | 13 | public static ContentPpxsModelImpl getInstance() { 14 | return new ContentPpxsModelImpl(); 15 | } 16 | 17 | private ContentPpxsModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("booktext").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentQulaModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentQulaModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.qu.la"; 12 | 13 | public static ContentQulaModelImpl getInstance() { 14 | return new ContentQulaModelImpl(); 15 | } 16 | 17 | private ContentQulaModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentQzreadModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentQzreadModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.qzread.com"; 12 | 13 | public static ContentQzreadModelImpl getInstance() { 14 | return new ContentQzreadModelImpl(); 15 | } 16 | 17 | private ContentQzreadModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementsByClass("txt").get(0).getElementsByTag("p").get(0).textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentRanwenaModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentRanwenaModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.ranwena.com"; 12 | 13 | public static ContentRanwenaModelImpl getInstance() { 14 | return new ContentRanwenaModelImpl(); 15 | } 16 | 17 | private ContentRanwenaModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentShulouModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.Element; 8 | 9 | public class ContentShulouModelImpl implements IWebContentModel{ 10 | public static final String TAG = "http://www.shulou.cc"; 11 | 12 | public static ContentShulouModelImpl getInstance(){ 13 | return new ContentShulouModelImpl(); 14 | } 15 | private ContentShulouModelImpl(){ 16 | 17 | } 18 | 19 | @Override 20 | public String analyBookcontent(String s, String realUrl) throws Exception{ 21 | Document doc = Jsoup.parse(s); 22 | Element contentE = doc.getElementById("content"); 23 | String contentString = contentE.toString(); 24 | contentString = contentString.replaceAll(" ", "").replaceAll("\n", "").replaceAll(" ", "").replaceAll("", "").replaceAll("", "").replaceAll("

","").replaceAll("

", "\r\n\u3000\u3000"); 25 | contentString = "\u3000\u3000" + contentString; 26 | return contentString; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentSnwx8ModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentSnwx8ModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.snwx8.com"; 12 | 13 | public static ContentSnwx8ModelImpl getInstance() { 14 | return new ContentSnwx8ModelImpl(); 15 | } 16 | 17 | private ContentSnwx8ModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("BookText").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for(int i=0;i0){ 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentSuimengModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentSuimengModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.suimeng.la"; 12 | 13 | public static ContentSuimengModelImpl getInstance() { 14 | return new ContentSuimengModelImpl(); 15 | } 16 | 17 | private ContentSuimengModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("ccontent").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentSyzwwModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | /** 11 | * 站点有问题 未完全解析 12 | */ 13 | public class ContentSyzwwModelImpl implements IWebContentModel{ 14 | public static final String TAG = "http://www.syzww.net"; 15 | 16 | public static ContentSyzwwModelImpl getInstance() { 17 | return new ContentSyzwwModelImpl(); 18 | } 19 | 20 | private ContentSyzwwModelImpl() { 21 | 22 | } 23 | @Override 24 | public String analyBookcontent(String s, String realUrl) throws Exception { 25 | Document doc = Jsoup.parse(s); 26 | List contentEs = doc.getElementById("content").textNodes(); 27 | StringBuilder content = new StringBuilder(); 28 | for (int i = 0; i < contentEs.size(); i++) { 29 | String temp = contentEs.get(i).text().trim(); 30 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 31 | if (temp.length() > 0) { 32 | content.append("\u3000\u3000" + temp); 33 | if (i < contentEs.size() - 1) { 34 | content.append("\r\n"); 35 | } 36 | } 37 | } 38 | return content.toString(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentVodtwModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.Element; 8 | import org.jsoup.select.Elements; 9 | 10 | public class ContentVodtwModelImpl implements IWebContentModel { 11 | public static final String TAG = "http://www.vodtw.com"; 12 | 13 | public static ContentVodtwModelImpl getInstance() { 14 | return new ContentVodtwModelImpl(); 15 | } 16 | 17 | private ContentVodtwModelImpl() { 18 | 19 | } 20 | 21 | @Override 22 | public String analyBookcontent(String s, String realUrl) throws Exception { 23 | Document doc = Jsoup.parse(s); 24 | Element contentE = doc.getElementById("BookText"); 25 | StringBuilder content = new StringBuilder(); 26 | 27 | Elements contentEs = contentE.getElementsByTag("p"); 28 | for (int i = 0; i < contentEs.size(); i++) { 29 | String temp = contentEs.get(i).text().trim(); 30 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 31 | if (temp.length() > 0) { 32 | content.append("\u3000\u3000" + temp); 33 | if (i < contentEs.size() - 1) { 34 | content.append("\r\n"); 35 | } 36 | } 37 | } 38 | return content.toString(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentWxguanModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.nodes.TextNode; 8 | import java.util.List; 9 | 10 | public class ContentWxguanModelImpl implements IWebContentModel{ 11 | public static final String TAG = "http://www.wxguan.com"; 12 | 13 | public static ContentWxguanModelImpl getInstance() { 14 | return new ContentWxguanModelImpl(); 15 | } 16 | 17 | private ContentWxguanModelImpl() { 18 | 19 | } 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception { 22 | Document doc = Jsoup.parse(s); 23 | List contentEs = doc.getElementById("content").textNodes(); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentXqingdouCCModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.select.Elements; 8 | 9 | public class ContentXqingdouCCModelImpl implements IWebContentModel { 10 | public static final String TAG = "http://www.xqingdou.cc"; 11 | 12 | public static ContentXqingdouCCModelImpl getInstance() { 13 | return new ContentXqingdouCCModelImpl(); 14 | } 15 | 16 | private ContentXqingdouCCModelImpl() { 17 | 18 | } 19 | 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception{ 22 | Document doc = Jsoup.parse(s); 23 | Elements contentEs = doc.getElementById("chapter_content").getElementsByTag("p"); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentXqingdouModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.select.Elements; 8 | 9 | public class ContentXqingdouModelImpl implements IWebContentModel { 10 | public static final String TAG = "http://www.xqingdou.com"; 11 | 12 | public static ContentXqingdouModelImpl getInstance() { 13 | return new ContentXqingdouModelImpl(); 14 | } 15 | 16 | private ContentXqingdouModelImpl() { 17 | 18 | } 19 | 20 | @Override 21 | public String analyBookcontent(String s, String realUrl) throws Exception{ 22 | Document doc = Jsoup.parse(s); 23 | Elements contentEs = doc.getElementById("chapter_content").getElementsByTag("p"); 24 | StringBuilder content = new StringBuilder(); 25 | for (int i = 0; i < contentEs.size(); i++) { 26 | String temp = contentEs.get(i).text().trim(); 27 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 28 | if (temp.length() > 0) { 29 | content.append("\u3000\u3000" + temp); 30 | if (i < contentEs.size() - 1) { 31 | content.append("\r\n"); 32 | } 33 | } 34 | } 35 | return content.toString(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/model/impl/ContentZhulangModelImpl.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.model.impl; 3 | 4 | import com.monke.monkeybook.model.IWebContentModel; 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | import org.jsoup.select.Elements; 8 | 9 | public class ContentZhulangModelImpl implements IWebContentModel{ 10 | public static final String TAG = "http://book.zhulang.com"; 11 | 12 | public static ContentZhulangModelImpl getInstance() { 13 | return new ContentZhulangModelImpl(); 14 | } 15 | 16 | private ContentZhulangModelImpl() { 17 | 18 | } 19 | @Override 20 | public String analyBookcontent(String s, String realUrl) throws Exception { 21 | Document doc = Jsoup.parse(s); 22 | Elements contentEs = doc.getElementById("read-content").children(); 23 | StringBuilder content = new StringBuilder(); 24 | for (int i = 3; i < contentEs.size()-1; i++) { 25 | String temp = contentEs.get(i).text().trim(); 26 | temp = temp.replaceAll(" ","").replaceAll(" ",""); 27 | if (temp.length() > 0) { 28 | content.append("\u3000\u3000" + temp); 29 | if (i < contentEs.size() - 1) { 30 | content.append("\r\n"); 31 | } 32 | } 33 | } 34 | return content.toString(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/IBookDetailPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | import com.monke.monkeybook.bean.BookShelfBean; 6 | import com.monke.monkeybook.bean.SearchBookBean; 7 | 8 | public interface IBookDetailPresenter extends IPresenter{ 9 | 10 | int getOpenfrom(); 11 | 12 | SearchBookBean getSearchBook(); 13 | 14 | BookShelfBean getBookShelf(); 15 | 16 | Boolean getInBookShelf(); 17 | 18 | void getBookShelfInfo(); 19 | 20 | void addToBookShelf(); 21 | 22 | void removeFromBookShelf(); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/IBookReadPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import android.app.Activity; 5 | import android.content.Intent; 6 | 7 | import com.monke.basemvplib.IPresenter; 8 | import com.monke.monkeybook.bean.BookShelfBean; 9 | import com.monke.monkeybook.presenter.impl.ReadBookPresenterImpl; 10 | import com.monke.monkeybook.widget.contentswitchview.BookContentView; 11 | 12 | public interface IBookReadPresenter extends IPresenter{ 13 | 14 | int getOpen_from(); 15 | 16 | BookShelfBean getBookShelf(); 17 | 18 | void initContent(); 19 | 20 | void loadContent(BookContentView bookContentView,long bookTag, final int chapterIndex, final int page); 21 | 22 | void updateProgress(int chapterIndex, int pageIndex); 23 | 24 | void saveProgress(); 25 | 26 | String getChapterTitle(int chapterIndex); 27 | 28 | void setPageLineCount(int pageLineCount); 29 | 30 | void addToShelf(final ReadBookPresenterImpl.OnAddListner addListner); 31 | 32 | Boolean getAdd(); 33 | 34 | void initData(Activity activity); 35 | 36 | void openBookFromOther(Activity activity); 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/IChoiceBookPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | import com.monke.monkeybook.bean.SearchBookBean; 6 | 7 | public interface IChoiceBookPresenter extends IPresenter{ 8 | 9 | int getPage(); 10 | 11 | void initPage(); 12 | 13 | void toSearchBooks(String key); 14 | 15 | void addBookToShelf(final SearchBookBean searchBookBean); 16 | 17 | String getTitle(); 18 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/IImportBookPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | 6 | import java.io.File; 7 | import java.util.List; 8 | 9 | public interface IImportBookPresenter extends IPresenter{ 10 | void searchLocationBook(); 11 | 12 | void importBooks(List books); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/ILibraryPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | import java.util.LinkedHashMap; 6 | 7 | public interface ILibraryPresenter extends IPresenter{ 8 | 9 | LinkedHashMap getKinds(); 10 | 11 | void getLibraryData(); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/IMainPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | 6 | public interface IMainPresenter extends IPresenter{ 7 | void queryBookShelf(Boolean needRefresh); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/presenter/ISearchPresenter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.presenter; 3 | 4 | import com.monke.basemvplib.IPresenter; 5 | import com.monke.monkeybook.bean.SearchBookBean; 6 | 7 | public interface ISearchPresenter extends IPresenter{ 8 | 9 | Boolean getHasSearch(); 10 | 11 | void setHasSearch(Boolean hasSearch); 12 | 13 | void insertSearchHistory(); 14 | 15 | void querySearchHistory(); 16 | 17 | void cleanSearchHistory(); 18 | 19 | int getPage(); 20 | 21 | void initPage(); 22 | 23 | void toSearchBooks(String key,Boolean fromError); 24 | 25 | void addBookToShelf(final SearchBookBean searchBookBean); 26 | 27 | Boolean getInput(); 28 | 29 | void setInput(Boolean input); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/utils/NetworkUtil.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.utils; 3 | 4 | import android.content.Context; 5 | import android.net.ConnectivityManager; 6 | import android.net.NetworkInfo; 7 | import com.monke.monkeybook.MApplication; 8 | import com.monke.monkeybook.R; 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | public class NetworkUtil { 13 | private static final Map errorMap = new HashMap<>(); 14 | 15 | public static final int SUCCESS = 10000; 16 | public static final int ERROR_CODE_NONET = 10001; 17 | public static final int ERROR_CODE_OUTTIME = 10002; 18 | public static final int ERROR_CODE_ANALY = 10003; 19 | 20 | static{ 21 | errorMap.put(ERROR_CODE_NONET, MApplication.getInstance().getString(R.string.net_error_10001)); 22 | errorMap.put(ERROR_CODE_OUTTIME, MApplication.getInstance().getString(R.string.net_error_10002)); 23 | errorMap.put(ERROR_CODE_ANALY, MApplication.getInstance().getString(R.string.net_error_10003)); 24 | } 25 | 26 | public static String getErrorTip(int code) { 27 | return errorMap.get(code); 28 | } 29 | 30 | public static boolean isNetWorkAvailable() { 31 | ConnectivityManager manager = (ConnectivityManager) MApplication.getInstance() 32 | .getSystemService(Context.CONNECTIVITY_SERVICE); 33 | if (manager != null) { 34 | NetworkInfo info = manager.getActiveNetworkInfo(); 35 | if (info != null && info.isConnected()) { 36 | return true; 37 | } else { 38 | return false; 39 | } 40 | } else { 41 | return false; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/utils/ParseSystemUtil.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.utils; 2 | 3 | public class ParseSystemUtil { 4 | /**将二进制转换成16进制 5 | * @param buf 6 | * @return 7 | */ 8 | public static String parseByte2HexStr(byte buf[]) { 9 | StringBuffer sb = new StringBuffer(); 10 | for (int i = 0; i < buf.length; i++) { 11 | String hex = Integer.toHexString(buf[i] & 0xFF); 12 | if (hex.length() == 1) { 13 | hex = '0' + hex; 14 | } 15 | sb.append(hex.toUpperCase()); 16 | } 17 | return sb.toString(); 18 | } 19 | 20 | /**将16进制转换为二进制 21 | * @param hexStr 22 | * @return 23 | */ 24 | public static byte[] parseHexStr2Byte(String hexStr) { 25 | if (hexStr==null || hexStr.length() ==0) { 26 | return null; 27 | } 28 | byte[] result = new byte[hexStr.length()/2]; 29 | for (int i = 0;i< hexStr.length()/2; i++) { 30 | int high = Integer.parseInt(hexStr.substring(i*2, i*2+1), 16); 31 | int low = Integer.parseInt(hexStr.substring(i*2+1, i*2+2), 16); 32 | result[i] = (byte) (high * 16 + low); 33 | } 34 | return result; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/utils/aes/AESUtil.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.utils.aes; 2 | 3 | import com.monke.monkeybook.utils.ParseSystemUtil; 4 | 5 | import javax.crypto.*; 6 | import javax.crypto.spec.SecretKeySpec; 7 | 8 | import java.io.UnsupportedEncodingException; 9 | 10 | public class AESUtil { 11 | public static String aesEncode(String cleartext, String seed) throws Exception { 12 | byte[] rawKey = deriveKeyInsecurely(seed, 32).getEncoded(); 13 | byte[] result = encrypt(rawKey, cleartext.getBytes()); 14 | return ParseSystemUtil.parseByte2HexStr(result); 15 | } 16 | 17 | public static String aesDecode(String encrypted, String seed) throws Exception { 18 | byte[] rawKey = deriveKeyInsecurely(seed, 32).getEncoded(); 19 | byte[] enc = ParseSystemUtil.parseHexStr2Byte(encrypted); 20 | byte[] result = decrypt(rawKey, enc); 21 | return new String(result); 22 | } 23 | 24 | private static SecretKey deriveKeyInsecurely(String password, int keySizeInBytes) throws UnsupportedEncodingException { 25 | byte[] passwordBytes = password.getBytes("UTF-8"); 26 | return new SecretKeySpec( 27 | InsecureSHA1PRNGKeyDerivator.deriveInsecureKey( 28 | passwordBytes, keySizeInBytes), 29 | "AES"); 30 | } 31 | 32 | private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception { 33 | SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); 34 | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); 35 | cipher.init(Cipher.ENCRYPT_MODE, skeySpec); 36 | byte[] encrypted = cipher.doFinal(clear); 37 | return encrypted; 38 | } 39 | 40 | private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception { 41 | SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); 42 | Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); 43 | cipher.init(Cipher.DECRYPT_MODE, skeySpec); 44 | byte[] decrypted = cipher.doFinal(encrypted); 45 | return decrypted; 46 | } 47 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/utils/base64/BASE64Encoder.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.utils.base64; 2 | 3 | import java.io.IOException; 4 | import java.io.OutputStream; 5 | 6 | public class BASE64Encoder extends CharacterEncoder{ 7 | private static final char[] pem_array = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; 8 | 9 | public BASE64Encoder() { 10 | } 11 | 12 | protected int bytesPerAtom() { 13 | return 3; 14 | } 15 | 16 | protected int bytesPerLine() { 17 | return 57; 18 | } 19 | 20 | protected void encodeAtom(OutputStream var1, byte[] var2, int var3, int var4) throws IOException { 21 | byte var5; 22 | if (var4 == 1) { 23 | var5 = var2[var3]; 24 | byte var6 = 0; 25 | boolean var7 = false; 26 | var1.write(pem_array[var5 >>> 2 & 63]); 27 | var1.write(pem_array[(var5 << 4 & 48) + (var6 >>> 4 & 15)]); 28 | var1.write(61); 29 | var1.write(61); 30 | } else { 31 | byte var8; 32 | if (var4 == 2) { 33 | var5 = var2[var3]; 34 | var8 = var2[var3 + 1]; 35 | byte var9 = 0; 36 | var1.write(pem_array[var5 >>> 2 & 63]); 37 | var1.write(pem_array[(var5 << 4 & 48) + (var8 >>> 4 & 15)]); 38 | var1.write(pem_array[(var8 << 2 & 60) + (var9 >>> 6 & 3)]); 39 | var1.write(61); 40 | } else { 41 | var5 = var2[var3]; 42 | var8 = var2[var3 + 1]; 43 | byte var10 = var2[var3 + 2]; 44 | var1.write(pem_array[var5 >>> 2 & 63]); 45 | var1.write(pem_array[(var5 << 4 & 48) + (var8 >>> 4 & 15)]); 46 | var1.write(pem_array[(var8 << 2 & 60) + (var10 >>> 6 & 3)]); 47 | var1.write(pem_array[var10 & 63]); 48 | } 49 | } 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/utils/base64/CEFormatException.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.utils.base64; 2 | 3 | import java.io.IOException; 4 | 5 | public class CEFormatException extends IOException { 6 | static final long serialVersionUID = -7139121221067081482L; 7 | 8 | public CEFormatException(String var1) { 9 | super(var1); 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/utils/base64/CEStreamExhausted.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.utils.base64; 2 | 3 | import java.io.IOException; 4 | 5 | public class CEStreamExhausted extends IOException { 6 | static final long serialVersionUID = -5889118049525891904L; 7 | 8 | public CEStreamExhausted() { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/IBookDetailView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import com.monke.basemvplib.IView; 5 | 6 | public interface IBookDetailView extends IView{ 7 | /** 8 | * 更新书籍详情UI 9 | */ 10 | void updateView(); 11 | 12 | /** 13 | * 数据获取失败 14 | */ 15 | void getBookShelfError(); 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/IBookReadView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import android.graphics.Paint; 5 | import com.monke.basemvplib.IView; 6 | 7 | public interface IBookReadView extends IView{ 8 | 9 | /** 10 | * 获取当前阅读界面UI画笔 11 | * @return 12 | */ 13 | Paint getPaint(); 14 | 15 | /** 16 | * 获取当前小说内容可绘制宽度 17 | * @return 18 | */ 19 | int getContentWidth(); 20 | 21 | /** 22 | * 小说数据初始化成功 23 | * @param durChapterIndex 24 | * @param chapterAll 25 | * @param durPageIndex 26 | */ 27 | void initContentSuccess(int durChapterIndex, int chapterAll, int durPageIndex); 28 | 29 | /** 30 | * 开始加载 31 | */ 32 | void startLoadingBook(); 33 | 34 | void setHpbReadProgressMax(int count); 35 | 36 | void initPop(); 37 | 38 | void showLoadBook(); 39 | 40 | void dimissLoadBook(); 41 | 42 | void loadLocationBookError(); 43 | 44 | void showDownloadMenu(); 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/IChoiceBookView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import com.monke.basemvplib.IView; 5 | import com.monke.monkeybook.bean.SearchBookBean; 6 | import com.monke.monkeybook.view.adapter.ChoiceBookAdapter; 7 | import java.util.List; 8 | 9 | public interface IChoiceBookView extends IView{ 10 | 11 | void refreshSearchBook(List books); 12 | 13 | void loadMoreSearchBook(List books); 14 | 15 | void refreshFinish(Boolean isAll); 16 | 17 | void loadMoreFinish(Boolean isAll); 18 | 19 | void searchBookError(); 20 | 21 | void addBookShelfSuccess(List searchBooks); 22 | 23 | void addBookShelfFailed(int code); 24 | 25 | ChoiceBookAdapter getSearchBookAdapter(); 26 | 27 | void updateSearchItem(int index); 28 | 29 | void startRefreshAnim(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/IImportBookView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import com.monke.basemvplib.IView; 5 | import java.io.File; 6 | 7 | public interface IImportBookView extends IView{ 8 | 9 | /** 10 | * 新增书籍 11 | * @param newFile 12 | */ 13 | void addNewBook(File newFile); 14 | 15 | /** 16 | * 书籍搜索完成 17 | */ 18 | void searchFinish(); 19 | 20 | /** 21 | * 添加成功 22 | */ 23 | void addSuccess(); 24 | 25 | /** 26 | * 添加失败 27 | */ 28 | void addError(); 29 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/ILibraryView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import com.monke.basemvplib.IView; 5 | import com.monke.monkeybook.bean.LibraryBean; 6 | 7 | public interface ILibraryView extends IView{ 8 | 9 | /** 10 | * 书城书籍获取成功 更新UI 11 | * @param library 12 | */ 13 | void updateUI(LibraryBean library); 14 | 15 | /** 16 | * 书城数据刷新成功 更新UI 17 | */ 18 | void finishRefresh(); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/IMainView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import com.monke.basemvplib.IView; 5 | import com.monke.monkeybook.bean.BookShelfBean; 6 | 7 | import java.util.List; 8 | 9 | public interface IMainView extends IView{ 10 | 11 | /** 12 | * 刷新书架书籍小说信息 更新UI 13 | * @param bookShelfBeanList 14 | */ 15 | void refreshBookShelf(List bookShelfBeanList); 16 | 17 | /** 18 | * 执行刷新书架小说信息 19 | */ 20 | void activityRefreshView(); 21 | 22 | /** 23 | * 刷新完成 24 | */ 25 | void refreshFinish(); 26 | 27 | /** 28 | * 刷新错误 29 | * @param error 30 | */ 31 | void refreshError(String error); 32 | 33 | /** 34 | * 刷新书籍 UI进度修改 35 | */ 36 | void refreshRecyclerViewItemAdd(); 37 | 38 | /** 39 | * 设置刷新进度条最大值 40 | * @param x 41 | */ 42 | void setRecyclerMaxProgress(int x); 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/ISearchView.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view; 3 | 4 | import android.widget.EditText; 5 | import com.monke.basemvplib.IView; 6 | import com.monke.monkeybook.bean.SearchBookBean; 7 | import com.monke.monkeybook.bean.SearchHistoryBean; 8 | import com.monke.monkeybook.view.adapter.SearchBookAdapter; 9 | import java.util.List; 10 | 11 | public interface ISearchView extends IView{ 12 | 13 | /** 14 | * 成功 新增查询记录 15 | * @param searchHistoryBean 16 | */ 17 | void insertSearchHistorySuccess(SearchHistoryBean searchHistoryBean); 18 | 19 | /** 20 | * 成功搜索 搜索记录 21 | * @param datas 22 | */ 23 | void querySearchHistorySuccess(List datas); 24 | 25 | /** 26 | * 首次查询成功 更新UI 27 | * @param books 28 | */ 29 | void refreshSearchBook(List books); 30 | 31 | /** 32 | * 加载更多书籍成功 更新UI 33 | * @param books 34 | */ 35 | void loadMoreSearchBook(List books); 36 | 37 | /** 38 | * 刷新成功 39 | * @param isAll 40 | */ 41 | void refreshFinish(Boolean isAll); 42 | 43 | /** 44 | * 加载成功 45 | * @param isAll 46 | */ 47 | void loadMoreFinish(Boolean isAll); 48 | 49 | /** 50 | * 搜索失败 51 | * @param isRefresh 52 | */ 53 | void searchBookError(Boolean isRefresh); 54 | 55 | /** 56 | * 获取搜索内容EditText 57 | * @return 58 | */ 59 | EditText getEdtContent(); 60 | 61 | /** 62 | * 添加书籍失败 63 | * @param code 64 | */ 65 | void addBookShelfFailed(int code); 66 | 67 | SearchBookAdapter getSearchBookAdapter(); 68 | 69 | void updateSearchItem(int index); 70 | 71 | /** 72 | * 判断书籍是否已经在书架上 73 | * @param searchBookBean 74 | * @return 75 | */ 76 | Boolean checkIsExist(SearchBookBean searchBookBean); 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/adapter/SearchHistoryAdapter.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view.adapter; 3 | 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.widget.TextView; 7 | import com.monke.monkeybook.R; 8 | import com.monke.monkeybook.bean.SearchHistoryBean; 9 | import com.monke.monkeybook.widget.flowlayout.FlowLayout; 10 | import com.monke.monkeybook.widget.flowlayout.TagAdapter; 11 | import java.util.ArrayList; 12 | 13 | public class SearchHistoryAdapter extends TagAdapter { 14 | public SearchHistoryAdapter() { 15 | super(new ArrayList()); 16 | } 17 | 18 | public interface OnItemClickListener{ 19 | void itemClick(SearchHistoryBean searchHistoryBean); 20 | } 21 | private SearchHistoryAdapter.OnItemClickListener onItemClickListener; 22 | 23 | public OnItemClickListener getListener() { 24 | return onItemClickListener; 25 | } 26 | 27 | public void setOnItemClickListener(OnItemClickListener listener) { 28 | this.onItemClickListener = listener; 29 | } 30 | 31 | @Override 32 | public View getView(FlowLayout parent, int position, final SearchHistoryBean searchHistoryBean) { 33 | TextView tv = (TextView) LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_searchhistory_item, 34 | parent, false); 35 | tv.setText(searchHistoryBean.getContent()); 36 | tv.setOnClickListener(new View.OnClickListener() { 37 | @Override 38 | public void onClick(View v) { 39 | if(null != onItemClickListener){ 40 | onItemClickListener.itemClick(searchHistoryBean); 41 | } 42 | } 43 | }); 44 | return tv; 45 | } 46 | 47 | public SearchHistoryBean getItemData(int position){ 48 | return mTagDatas.get(position); 49 | } 50 | 51 | public int getDataSize(){ 52 | return mTagDatas.size(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/view/popupwindow/ReadBookMenuMorePop.java: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2017. 章钦豪. All rights reserved. 2 | package com.monke.monkeybook.view.popupwindow; 3 | 4 | import android.content.Context; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.LinearLayout; 9 | import android.widget.PopupWindow; 10 | import com.monke.monkeybook.R; 11 | 12 | public class ReadBookMenuMorePop extends PopupWindow{ 13 | private Context mContext; 14 | private View view; 15 | 16 | private LinearLayout llDownload; 17 | 18 | public ReadBookMenuMorePop(Context context){ 19 | super(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT); 20 | this.mContext = context; 21 | view = LayoutInflater.from(mContext).inflate(R.layout.view_pop_menumore,null); 22 | this.setContentView(view); 23 | 24 | initView(); 25 | 26 | setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.shape_pop_checkaddshelf_bg)); 27 | setFocusable(true); 28 | setTouchable(true); 29 | setAnimationStyle(R.style.anim_pop_windowmenumore); 30 | } 31 | 32 | private void initView() { 33 | llDownload = (LinearLayout) view.findViewById(R.id.ll_download); 34 | } 35 | 36 | public void setOnClickDownload(View.OnClickListener clickDownload){ 37 | llDownload.setOnClickListener(clickDownload); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/MTextView.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.text.Layout; 6 | import android.text.StaticLayout; 7 | import android.text.TextPaint; 8 | import android.util.AttributeSet; 9 | 10 | /** 11 | * Created by ZQH on 2017/4/10. 12 | */ 13 | 14 | public class MTextView extends android.support.v7.widget.AppCompatTextView { 15 | 16 | public MTextView(Context context, AttributeSet attrs) { 17 | super(context, attrs); 18 | } 19 | 20 | @Override 21 | protected void onLayout(boolean changed, int left, int top, int right, 22 | int bottom) { 23 | super.onLayout(changed, left, top, right, bottom); 24 | } 25 | 26 | @Override 27 | protected void onDraw(Canvas canvas) { 28 | TextPaint paint = getPaint(); 29 | paint.setColor(getTextColors().getDefaultColor()); 30 | Layout layout = new StaticLayout(getText(), paint, canvas.getWidth(), Layout.Alignment.ALIGN_NORMAL, getLineSpacingMultiplier(), getLineSpacingExtra(), false); 31 | layout.draw(canvas); 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/flowlayout/TagAdapter.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget.flowlayout; 2 | 3 | import android.view.View; 4 | 5 | import java.util.ArrayList; 6 | import java.util.Arrays; 7 | import java.util.HashSet; 8 | import java.util.List; 9 | import java.util.Set; 10 | 11 | public abstract class TagAdapter { 12 | protected List mTagDatas; 13 | private OnDataChangedListener mOnDataChangedListener; 14 | protected HashSet mCheckedPosList = new HashSet(); 15 | 16 | public TagAdapter(){ 17 | 18 | } 19 | 20 | public TagAdapter(List datas) { 21 | mTagDatas = datas; 22 | } 23 | 24 | public TagAdapter(T[] datas) { 25 | mTagDatas = new ArrayList(Arrays.asList(datas)); 26 | } 27 | 28 | interface OnDataChangedListener { 29 | void onChanged(); 30 | } 31 | 32 | void setOnDataChangedListener(OnDataChangedListener listener) { 33 | mOnDataChangedListener = listener; 34 | } 35 | 36 | public void setSelectedList(int... poses) { 37 | Set set = new HashSet<>(); 38 | for (int pos : poses) { 39 | set.add(pos); 40 | } 41 | setSelectedList(set); 42 | } 43 | 44 | public void setSelectedList(Set set) { 45 | mCheckedPosList.clear(); 46 | if (set != null) 47 | mCheckedPosList.addAll(set); 48 | notifyDataChanged(); 49 | } 50 | 51 | public synchronized void replaceAll(List newDatas){ 52 | mTagDatas.clear(); 53 | if(newDatas != null) 54 | mTagDatas.addAll(newDatas); 55 | notifyDataChanged(); 56 | } 57 | 58 | HashSet getPreCheckedList() { 59 | return mCheckedPosList; 60 | } 61 | 62 | 63 | public int getCount() { 64 | return mTagDatas == null ? 0 : mTagDatas.size(); 65 | } 66 | 67 | public void notifyDataChanged() { 68 | mOnDataChangedListener.onChanged(); 69 | } 70 | 71 | public T getItem(int position) { 72 | return mTagDatas.get(position); 73 | } 74 | 75 | public abstract View getView(FlowLayout parent, int position, T t); 76 | 77 | public boolean setSelected(int position, T t) { 78 | return false; 79 | } 80 | 81 | 82 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/flowlayout/TagView.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget.flowlayout; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.widget.Checkable; 6 | import android.widget.FrameLayout; 7 | 8 | public class TagView extends FrameLayout implements Checkable 9 | { 10 | private boolean isChecked; 11 | private static final int[] CHECK_STATE = new int[]{android.R.attr.state_checked}; 12 | 13 | public TagView(Context context) 14 | { 15 | super(context); 16 | } 17 | 18 | public View getTagView() 19 | { 20 | return getChildAt(0); 21 | } 22 | 23 | @Override 24 | public int[] onCreateDrawableState(int extraSpace) 25 | { 26 | int[] states = super.onCreateDrawableState(extraSpace + 1); 27 | if (isChecked()) 28 | { 29 | mergeDrawableStates(states, CHECK_STATE); 30 | } 31 | return states; 32 | } 33 | 34 | 35 | /** 36 | * Change the checked state of the view 37 | * 38 | * @param checked The new checked state 39 | */ 40 | @Override 41 | public void setChecked(boolean checked) 42 | { 43 | if (this.isChecked != checked) 44 | { 45 | this.isChecked = checked; 46 | refreshDrawableState(); 47 | } 48 | } 49 | 50 | /** 51 | * @return The current checked state of the view 52 | */ 53 | @Override 54 | public boolean isChecked() 55 | { 56 | return isChecked; 57 | } 58 | 59 | /** 60 | * Change the checked state of the view to the inverse of its current state 61 | */ 62 | @Override 63 | public void toggle() 64 | { 65 | setChecked(!isChecked); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/libraryview/LibraryNewBooksAdapter.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget.libraryview; 2 | 3 | import android.view.LayoutInflater; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | import com.monke.monkeybook.R; 7 | import com.monke.monkeybook.bean.LibraryNewBookBean; 8 | import com.monke.monkeybook.widget.flowlayout.FlowLayout; 9 | import com.monke.monkeybook.widget.flowlayout.TagAdapter; 10 | import java.util.ArrayList; 11 | 12 | public class LibraryNewBooksAdapter extends TagAdapter { 13 | private LibraryNewBooksView.OnClickAuthorListener clickNewBookListener; 14 | 15 | public LibraryNewBooksAdapter() { 16 | super(new ArrayList()); 17 | } 18 | 19 | @Override 20 | public View getView(FlowLayout parent, int position, final LibraryNewBookBean libraryNewBookBean) { 21 | TextView tv = (TextView) LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_library_hotauthor_item, 22 | parent, false); 23 | tv.setText(libraryNewBookBean.getName()); 24 | tv.setOnClickListener(new View.OnClickListener() { 25 | @Override 26 | public void onClick(View v) { 27 | if(null != clickNewBookListener){ 28 | clickNewBookListener.clickNewBook(libraryNewBookBean); 29 | } 30 | } 31 | }); 32 | return tv; 33 | } 34 | 35 | public LibraryNewBookBean getItemData(int position){ 36 | return mTagDatas.get(position); 37 | } 38 | 39 | public int getDataSize(){ 40 | return mTagDatas.size(); 41 | } 42 | 43 | public void setClickNewBookListener(LibraryNewBooksView.OnClickAuthorListener clickNewBookListener) { 44 | this.clickNewBookListener = clickNewBookListener; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/refreshview/BaseRefreshListener.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget.refreshview; 2 | 3 | public interface BaseRefreshListener { 4 | 5 | public void startRefresh(); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/refreshview/OnLoadMoreListener.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget.refreshview; 2 | 3 | public interface OnLoadMoreListener { 4 | 5 | public void startLoadmore(); 6 | 7 | public void loadMoreErrorTryAgain(); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/monke/monkeybook/widget/refreshview/OnRefreshWithProgressListener.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook.widget.refreshview; 2 | 3 | public interface OnRefreshWithProgressListener extends BaseRefreshListener{ 4 | 5 | public int getMaxProgress(); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_act_importbook_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_act_importbook_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_bookshelf_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_chapterlist_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_chapterlist_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_checkaddshelf_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_checkaddshelf_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_moresetting_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_moresetting_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_windowlight_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_windowlight_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_windowmenumore_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 13 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_pop_windowmenumore_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 13 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_readbook_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_readbook_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_readbook_top_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_readbook_top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_in_bottom_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_in_top_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_out_bottom_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/moprogress_out_top_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/color/selector_kind_tv_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/bg_ib_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/bg_ib_pre2.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/bg_ib_pre3.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_btn_watch_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_btn_watch_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_btn_watch_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_btn_watch_sel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_readbook_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_readbook_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_readbook_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_readbook_green.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_readbook_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_readbook_yellow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_search.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_search.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_shadow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_shadow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_shadow2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/bg_welcome.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_add_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_add_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_add_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_add_sel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_catalog_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_catalog_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_catalog_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_catalog_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_cursor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_download.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_download_main_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_download_main_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_download_main_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_download_main_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_font_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_font_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_font_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_font_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_library_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_library_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_library_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_library_sel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_light_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_light_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_light_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_light_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_money_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_money_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_money_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_money_sel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_monkovel_big_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_monkovel_big_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_monkovel_big_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_monkovel_big_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_monkovel_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_monkovel_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_monkovel_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_monkovel_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_more_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_more_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_more_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_more_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_readbook_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_readbook_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_readbook_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_readbook_green.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_readbook_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_readbook_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_readbook_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_readbook_yellow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_return_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_return_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_return_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_return_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_search_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_search_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_search_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_search_sel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_select.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_setting_main_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_setting_main_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_setting_main_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_setting_main_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_setting_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_setting_nor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_setting_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_setting_pre.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_slider.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/icon_text.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_cover_default.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/img_cover_default.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_shelf_lastest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/img_shelf_lastest.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_shelf_lastest_tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/img_shelf_lastest_tips.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/img_shelf_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/drawable-xxhdpi/img_shelf_other.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_ib_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_ib_pre2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_ib_pre3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_search_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/moprogress_bg_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_bg_download.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_bg_download_cancel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_bg_watch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_book_detail_read_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_book_detail_shelf_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_donwload_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_font.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_light.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_more.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_icon_setting_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_importbook_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_iv_add.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_iv_library.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_iv_money.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_iv_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_pop_font_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_pop_font_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_switchbutton.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tv_addshelf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tv_addshelf_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tv_black.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tv_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tv_rank_kind.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tv_rank_kind_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_download_cancel_nor.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_download_cancel_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_download_nor.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_download_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_readbook_black.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_readbook_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_readbook_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_bg_readbook_yellow.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_pop_checkaddshelf_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_pop_font_bg_nor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_pop_font_bg_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_progress_cursor_read.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_search_history_roundrect.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_search_history_roundrect_disable.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_search_history_roundrect_press.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_text_cursor.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_bookchoice.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 21 | 33 | 34 | 37 | 45 | 50 | 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_library_hotauthor_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/adapter_searchhistory_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/moprogress_dialog_infor.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 16 | 20 | 32 | 45 | 46 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/moprogress_dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 17 | 22 | 31 | 32 | 33 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/moprogress_dialog_two.xml: -------------------------------------------------------------------------------- 1 | 4 | 14 | 24 | 28 | 32 | 42 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_adapter_chapterlist.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 22 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_kind.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_library_hotauthor.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_library_kindbook.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | 21 | 22 | 26 | 37 | 38 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_pop_menumore.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 25 | 26 | 31 | 32 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_refresh_loadmore.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_refresh_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_searchbook_nodata.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 10 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_searchbook_refresherror.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/attr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #c1c1c1 8 | #aaaaaa 9 | 10 | #737373 11 | #adadad 12 | #343434 13 | #f1f1f1 14 | 15 | #ffffff 16 | #7891A5 17 | #7891A5 18 | #587A8A 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MONKOVEL 3 | 4 | 5954b3f999f0c76d1b001600 5 | 6 | 没有网络 7 | 网络连接超时 8 | 数据解析失败 9 | 10 | 观看至:%s 11 | 《%s》 12 | 最新章节:%s 13 | 是否将《%s》放入书架? 14 | 共%s个Text文件 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 16 | 17 | 21 | 22 | ' 26 | 27 | 31 | 32 | 36 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/test/java/com/monke/monkeybook/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.monke.monkeybook; 2 | 3 | import org.junit.Test; 4 | import static org.junit.Assert.*; 5 | 6 | /** 7 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 8 | */ 9 | public class ExampleUnitTest { 10 | @Test 11 | public void addition_isCorrect() throws Exception { 12 | assertEquals(4, 2 + 2); 13 | } 14 | } -------------------------------------------------------------------------------- /basemvplib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /basemvplib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 28 5 | buildToolsVersion '28.0.3' 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 26 10 | versionCode 2 11 | versionName "1.1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | api fileTree(dir: 'libs', include: ['*.jar']) 23 | testImplementation 'junit:junit:4.12' 24 | api 'com.android.support:appcompat-v7:28.0.0' 25 | 26 | //RxAndroid 27 | api 'io.reactivex.rxjava2:rxandroid:2.1.0' 28 | api 'io.reactivex.rxjava2:rxjava:2.2.5' 29 | 30 | //Rxlifecycle 31 | api 'com.trello.rxlifecycle2:rxlifecycle:2.0.1' 32 | api 'com.trello.rxlifecycle2:rxlifecycle-android:2.0.1' // If you want to bind to Android-specific lifecycles 33 | api 'com.trello.rxlifecycle2:rxlifecycle-components:2.0.1' // If you want pre-written Activities and Fragments you can subclass as providers 34 | api 'com.trello.rxlifecycle2:rxlifecycle-navi:2.0.1' // If you want to use Navi for providers 35 | api 'com.trello.rxlifecycle2:rxlifecycle-kotlin:2.0.1' // If you want to use Kotlin syntax 36 | 37 | //Retrofit 38 | api 'com.squareup.retrofit2:retrofit:2.2.0' 39 | api 'com.squareup.retrofit2:adapter-rxjava2:2.2.0' 40 | api 'com.squareup.retrofit2:converter-scalars:2.2.0' 41 | 42 | //RxBus 43 | api ('com.hwangjr.rxbus:rxbus:2.0.0-beta') { 44 | exclude group: 'com.jakewharton.timber', module: 'timber' 45 | } 46 | } -------------------------------------------------------------------------------- /basemvplib/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:\CodeTool\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 | -optimizationpasses 5 19 | -dontskipnonpubliclibraryclassmembers 20 | -dontusemixedcaseclassnames 21 | -classobfuscationdictionary obfuscationClassNames.txt 22 | -dontskipnonpubliclibraryclasses 23 | 24 | ##################OKGO######################## 25 | #okgo 26 | -dontwarn com.lzy.okgo.** 27 | -keep class com.lzy.okgo.**{*;} 28 | 29 | #okrx 30 | -dontwarn com.lzy.okrx.** 31 | -keep class com.lzy.okrx.**{*;} 32 | 33 | #okserver 34 | -dontwarn com.lzy.okserver.** 35 | -keep class com.lzy.okserver.**{*;} -------------------------------------------------------------------------------- /basemvplib/src/androidTest/java/com/monke/basemvplib/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib; 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 | } -------------------------------------------------------------------------------- /basemvplib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/BaseApplication.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib; 2 | 3 | import android.app.Application; 4 | 5 | public class BaseApplication extends Application{ 6 | @Override 7 | public void onCreate() { 8 | super.onCreate(); 9 | } 10 | } -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/EncodoConverter.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib; 2 | 3 | import java.io.IOException; 4 | import java.lang.annotation.Annotation; 5 | import java.lang.reflect.Type; 6 | import java.nio.charset.Charset; 7 | import okhttp3.ResponseBody; 8 | import okio.BufferedSource; 9 | import okio.Okio; 10 | import retrofit2.Converter; 11 | import retrofit2.Retrofit; 12 | 13 | public class EncodoConverter extends Converter.Factory { 14 | 15 | private String encode = "utf-8"; 16 | 17 | private EncodoConverter(){ 18 | 19 | } 20 | private EncodoConverter(String encode){ 21 | this.encode = encode; 22 | } 23 | 24 | public static EncodoConverter create(){ 25 | return new EncodoConverter(); 26 | } 27 | 28 | public static EncodoConverter create(String en){ 29 | return new EncodoConverter(en); 30 | } 31 | 32 | @Override 33 | public Converter responseBodyConverter(Type type, Annotation[] annotations, 34 | Retrofit retrofit) { 35 | return new Converter() { 36 | @Override 37 | public String convert(ResponseBody value) throws IOException { 38 | BufferedSource bufferedSource = Okio.buffer(value.source()); 39 | String responseData = bufferedSource.readString(Charset.forName(encode)); 40 | return responseData; 41 | } 42 | }; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/IPresenter.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | public interface IPresenter { 6 | /** 7 | * 注入View,使之能够与View相互响应 8 | */ 9 | void attachView(@NonNull IView iView); 10 | 11 | /** 12 | * 释放资源,如果使用了网络请求 可以在此执行IModel.cancelRequest() 13 | */ 14 | void detachView(); 15 | } 16 | -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/IView.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib; 2 | 3 | import android.content.Context; 4 | 5 | public interface IView { 6 | public Context getContext(); 7 | } 8 | -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/impl/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib.impl; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import com.monke.basemvplib.IPresenter; 9 | import com.monke.basemvplib.IView; 10 | import com.trello.rxlifecycle2.components.RxFragment; 11 | 12 | public abstract class BaseFragment extends RxFragment implements IView{ 13 | protected View view; 14 | protected Bundle savedInstanceState; 15 | @Nullable 16 | @Override 17 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 18 | this.savedInstanceState = savedInstanceState; 19 | initSDK(); 20 | view = createView(inflater, container); 21 | initData(); 22 | bindView(); 23 | bindEvent(); 24 | firstRequest(); 25 | return view; 26 | } 27 | 28 | /** 29 | * 事件触发绑定 30 | */ 31 | protected void bindEvent() { 32 | 33 | } 34 | 35 | /** 36 | * 控件绑定 37 | */ 38 | protected void bindView() { 39 | 40 | } 41 | 42 | /** 43 | * 数据初始化 44 | */ 45 | protected void initData() { 46 | 47 | } 48 | 49 | /** 50 | * 首次逻辑操作 51 | */ 52 | protected void firstRequest() { 53 | 54 | } 55 | 56 | /** 57 | * 加载布局 58 | */ 59 | protected abstract View createView(LayoutInflater inflater, ViewGroup container); 60 | 61 | /** 62 | * 第三方SDK初始化 63 | */ 64 | protected void initSDK() { 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/impl/BaseModelImpl.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib.impl; 2 | 3 | import com.monke.basemvplib.EncodoConverter; 4 | 5 | import java.util.concurrent.TimeUnit; 6 | 7 | import okhttp3.OkHttpClient; 8 | import retrofit2.Retrofit; 9 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; 10 | import retrofit2.converter.scalars.ScalarsConverterFactory; 11 | 12 | public class BaseModelImpl { 13 | 14 | protected OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() 15 | .connectTimeout(10, TimeUnit.SECONDS) 16 | .writeTimeout(10, TimeUnit.SECONDS) 17 | .readTimeout(10, TimeUnit.SECONDS) 18 | .addNetworkInterceptor(new RetryIntercepter(1)); 19 | 20 | protected Retrofit getRetrofitObject(String url) { 21 | return new Retrofit.Builder().baseUrl(url) 22 | //增加返回值为字符串的支持(以实体类返回) 23 | .addConverterFactory(ScalarsConverterFactory.create()) 24 | //增加返回值为Oservable的支持 25 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 26 | .client(clientBuilder.build()) 27 | .build(); 28 | } 29 | 30 | protected Retrofit getRetrofitString(String url, String encode) { 31 | return new Retrofit.Builder().baseUrl(url) 32 | //增加返回值为字符串的支持(以实体类返回) 33 | .addConverterFactory(EncodoConverter.create(encode)) 34 | //增加返回值为Oservable的支持 35 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) 36 | .client(clientBuilder.build()) 37 | .build(); 38 | } 39 | } -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/impl/BasePresenterImpl.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib.impl; 2 | 3 | import android.support.annotation.NonNull; 4 | import com.monke.basemvplib.IPresenter; 5 | import com.monke.basemvplib.IView; 6 | 7 | public abstract class BasePresenterImpl implements IPresenter{ 8 | protected T mView; 9 | 10 | @Override 11 | public void attachView(@NonNull IView iView) { 12 | mView = (T) iView; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /basemvplib/src/main/java/com/monke/basemvplib/impl/RetryIntercepter.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib.impl; 2 | 3 | import java.io.IOException; 4 | 5 | import okhttp3.Interceptor; 6 | import okhttp3.Request; 7 | import okhttp3.Response; 8 | 9 | public class RetryIntercepter implements Interceptor { 10 | public int maxRetry;//最大重试次数 11 | private int retryNum = 0;//假如设置为3次重试的话,则最大可能请求4次(默认1次+3次重试) 12 | 13 | public RetryIntercepter(int maxRetry) { 14 | this.maxRetry = maxRetry; 15 | } 16 | 17 | @Override 18 | public Response intercept(Chain chain) throws IOException { 19 | Request request = chain.request(); 20 | Response response = chain.proceed(request); 21 | while (!response.isSuccessful() && retryNum < maxRetry) { 22 | retryNum++; 23 | response = chain.proceed(request); 24 | } 25 | return response; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /basemvplib/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/basemvplib/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /basemvplib/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/basemvplib/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /basemvplib/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/basemvplib/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /basemvplib/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/basemvplib/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /basemvplib/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/basemvplib/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /basemvplib/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /basemvplib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | BaseMvpLib 3 | 4 | -------------------------------------------------------------------------------- /basemvplib/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /basemvplib/src/test/java/com/monke/basemvplib/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.monke.basemvplib; 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 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | mavenCentral() 6 | maven { 7 | url 'https://maven.google.com/' 8 | name 'Google' 9 | } 10 | google() 11 | } 12 | dependencies { 13 | classpath 'com.android.tools.build:gradle:3.2.1' 14 | classpath 'org.greenrobot:greendao-gradle-plugin:3.0.0' 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | jcenter() 21 | maven { 22 | url 'https://maven.google.com/' 23 | name 'Google' 24 | } 25 | } 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | APP_NAME = MONKOVEL -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangQinhao/MONKOVEL/3aaf739f0e427b6c2688d081ef7f7d0471763732/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jan 02 23:04:20 CST 2019 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-4.6-all.zip 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':basemvplib' 2 | --------------------------------------------------------------------------------