├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ └── comic-source-issues.md └── stale.yml ├── .gitignore ├── .travis.yml ├── .travis └── build.sh ├── LICENSE.md ├── README.md ├── app-ads.txt ├── app ├── .gitignore ├── .key.jks ├── build.gradle ├── google-services.json ├── libs │ ├── commons-lang3-3.7.jar │ ├── jcc-bate-0.7.3.jar │ └── rhino-1.7.13.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── haleydu │ │ └── cimoc │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── easygo.json │ ├── ic_launcher-web.png │ ├── java │ └── com │ │ └── haleydu │ │ └── cimoc │ │ ├── App.java │ │ ├── Constants.java │ │ ├── component │ │ ├── AppGetter.java │ │ ├── DialogCaller.java │ │ └── ThemeResponsive.java │ │ ├── core │ │ ├── Backup.java │ │ ├── Download.java │ │ ├── Local.java │ │ ├── Manga.java │ │ ├── Storage.java │ │ ├── Update.java │ │ └── UpdateJson.java │ │ ├── fresco │ │ ├── ControllerBuilderProvider.java │ │ ├── ControllerBuilderSupplierFactory.java │ │ ├── ImagePipelineFactoryBuilder.java │ │ ├── OkHttpNetworkFetcher.java │ │ └── processor │ │ │ ├── BinaryPostprocessor.java │ │ │ └── MangaPostprocessor.java │ │ ├── global │ │ ├── ClickEvents.java │ │ ├── Extra.java │ │ └── FastClick.java │ │ ├── helper │ │ ├── DBOpenHelper.java │ │ └── UpdateHelper.java │ │ ├── manager │ │ ├── ChapterManager.java │ │ ├── ComicManager.java │ │ ├── ImageUrlManager.java │ │ ├── PreferenceManager.java │ │ ├── SourceManager.java │ │ ├── TagManager.java │ │ ├── TagRefManager.java │ │ └── TaskManager.java │ │ ├── misc │ │ ├── ActivityLifecycle.java │ │ ├── NotificationWrapper.java │ │ └── Switcher.java │ │ ├── model │ │ ├── Chapter.java │ │ ├── Comic.java │ │ ├── ImageUrl.java │ │ ├── MiniComic.java │ │ ├── Source.java │ │ ├── Tag.java │ │ ├── TagRef.java │ │ └── Task.java │ │ ├── network │ │ ├── DNSHelper.java │ │ └── HttpDns.java │ │ ├── parser │ │ ├── Category.java │ │ ├── JsonIterator.java │ │ ├── MangaCategory.java │ │ ├── MangaParser.java │ │ ├── NodeIterator.java │ │ ├── Parser.java │ │ ├── RegexIterator.java │ │ ├── SearchIterator.java │ │ └── UrlFilter.java │ │ ├── presenter │ │ ├── AboutPresenter.java │ │ ├── BackupPresenter.java │ │ ├── BasePresenter.java │ │ ├── ComicPresenter.java │ │ ├── DetailPresenter.java │ │ ├── DownloadPresenter.java │ │ ├── FavoritePresenter.java │ │ ├── HistoryPresenter.java │ │ ├── LocalPresenter.java │ │ ├── MainPresenter.java │ │ ├── PartFavoritePresenter.java │ │ ├── ReaderPresenter.java │ │ ├── ResultPresenter.java │ │ ├── SearchPresenter.java │ │ ├── SettingsPresenter.java │ │ ├── SourceDetailPresenter.java │ │ ├── SourcePresenter.java │ │ ├── TagEditorPresenter.java │ │ ├── TagPresenter.java │ │ └── TaskPresenter.java │ │ ├── rx │ │ ├── RxBus.java │ │ ├── RxEvent.java │ │ └── ToAnotherList.java │ │ ├── saf │ │ ├── DocumentFile.java │ │ ├── RawDocumentFile.java │ │ └── TreeDocumentFile.java │ │ ├── service │ │ └── DownloadService.java │ │ ├── soup │ │ ├── MDocument.java │ │ └── Node.java │ │ ├── source │ │ ├── Animx2.java │ │ ├── BaiNian.java │ │ ├── BuKa.java │ │ ├── CCMH.java │ │ ├── CCTuku.java │ │ ├── Cartoonmad.java │ │ ├── ChuiXue.java │ │ ├── Chuiyao.java │ │ ├── CopyMH.java │ │ ├── DM5.java │ │ ├── Dmzj.java │ │ ├── DmzjFix.java │ │ ├── Dmzjv2.java │ │ ├── EHentai.java │ │ ├── ExHentai.java │ │ ├── GuFeng.java │ │ ├── HHAAZZ.java │ │ ├── HHSSEE.java │ │ ├── Hhxxee.java │ │ ├── HotManga.java │ │ ├── IKanman.java │ │ ├── JMTT.java │ │ ├── Locality.java │ │ ├── MH160.java │ │ ├── MH50.java │ │ ├── MH517.java │ │ ├── MH57.java │ │ ├── MHLove.java │ │ ├── ManHuaDB.java │ │ ├── MangaBZ.kt │ │ ├── MangaNel.java │ │ ├── Mangakakalot.java │ │ ├── Manhuatai.java │ │ ├── MiGu.java │ │ ├── NHentai.java │ │ ├── Null.java │ │ ├── Ohmanhua.java │ │ ├── Pic177.java │ │ ├── PuFei.java │ │ ├── QiManWu.java │ │ ├── QiMiaoMH.java │ │ ├── SixMH.java │ │ ├── Tencent.java │ │ ├── TuHao.java │ │ ├── U17.java │ │ ├── Webtoon.java │ │ ├── WebtoonDongManManHua.java │ │ ├── Wnacg.java │ │ ├── YKMH.java │ │ └── YYLS.java │ │ ├── ui │ │ ├── activity │ │ │ ├── AboutActivity.java │ │ │ ├── BackActivity.java │ │ │ ├── BackupActivity.java │ │ │ ├── BaseActivity.java │ │ │ ├── BrowserFilter.java │ │ │ ├── CategoryActivity.java │ │ │ ├── ChapterActivity.java │ │ │ ├── CoordinatorActivity.java │ │ │ ├── DetailActivity.java │ │ │ ├── DirPickerActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── PageReaderActivity.java │ │ │ ├── PartFavoriteActivity.java │ │ │ ├── ReaderActivity.java │ │ │ ├── ResultActivity.java │ │ │ ├── SearchActivity.java │ │ │ ├── SettingsActivity.java │ │ │ ├── SourceDetailActivity.java │ │ │ ├── StreamReaderActivity.java │ │ │ ├── TagEditorActivity.java │ │ │ ├── TaskActivity.java │ │ │ └── settings │ │ │ │ ├── EventSettingsActivity.java │ │ │ │ └── ReaderConfigActivity.java │ │ ├── adapter │ │ │ ├── AutoCompleteAdapter.java │ │ │ ├── BaseAdapter.java │ │ │ ├── CategoryAdapter.java │ │ │ ├── ChapterAdapter.java │ │ │ ├── DetailAdapter.java │ │ │ ├── DirAdapter.java │ │ │ ├── GridAdapter.java │ │ │ ├── ReaderAdapter.java │ │ │ ├── ResultAdapter.java │ │ │ ├── SourceAdapter.java │ │ │ ├── TabPagerAdapter.java │ │ │ ├── TagAdapter.java │ │ │ ├── TagEditorAdapter.java │ │ │ └── TaskAdapter.java │ │ ├── fragment │ │ │ ├── BaseFragment.java │ │ │ ├── ComicFragment.java │ │ │ ├── config │ │ │ │ ├── PageConfigFragment.java │ │ │ │ └── StreamConfigFragment.java │ │ │ ├── dialog │ │ │ │ ├── ChoiceDialogFragment.java │ │ │ │ ├── EditorDialogFragment.java │ │ │ │ ├── ItemDialogFragment.java │ │ │ │ ├── MessageDialogFragment.java │ │ │ │ ├── MultiAdpaterDialogFragment.java │ │ │ │ ├── MultiDialogFragment.java │ │ │ │ ├── ProgressDialogFragment.java │ │ │ │ ├── SliderDialogFragment.java │ │ │ │ └── StorageEditorDialogFragment.java │ │ │ └── recyclerview │ │ │ │ ├── RecyclerViewFragment.java │ │ │ │ ├── SourceFragment.java │ │ │ │ ├── TagFragment.java │ │ │ │ └── grid │ │ │ │ ├── DownloadFragment.java │ │ │ │ ├── FavoriteFragment.java │ │ │ │ ├── GridFragment.java │ │ │ │ ├── HistoryFragment.java │ │ │ │ └── LocalFragment.java │ │ ├── view │ │ │ ├── AboutView.java │ │ │ ├── BackupView.java │ │ │ ├── BaseView.java │ │ │ ├── ComicView.java │ │ │ ├── DetailView.java │ │ │ ├── DownloadView.java │ │ │ ├── FavoriteView.java │ │ │ ├── GridView.java │ │ │ ├── HistoryView.java │ │ │ ├── LocalView.java │ │ │ ├── MainView.java │ │ │ ├── PartFavoriteView.java │ │ │ ├── ReaderView.java │ │ │ ├── ResultView.java │ │ │ ├── SearchView.java │ │ │ ├── SettingsView.java │ │ │ ├── SourceDetailView.java │ │ │ ├── SourceView.java │ │ │ ├── TagEditorView.java │ │ │ ├── TagView.java │ │ │ └── TaskView.java │ │ └── widget │ │ │ ├── AnimatedScaleRunnable.java │ │ │ ├── ChapterButton.java │ │ │ ├── CustomToast.java │ │ │ ├── FlingRunnable.java │ │ │ ├── MiniClockText.java │ │ │ ├── OnScaleDragGestureListener.java │ │ │ ├── OnTapGestureListener.java │ │ │ ├── Option.java │ │ │ ├── PhotoDraweeView.java │ │ │ ├── PreCacheLayoutManager.java │ │ │ ├── RetryDraweeView.java │ │ │ ├── ReverseSeekBar.java │ │ │ ├── ScaleDragDetector.java │ │ │ ├── ScrollAwareFABBehavior.java │ │ │ ├── ViewUtils.java │ │ │ ├── ZoomableRecyclerView.java │ │ │ ├── preference │ │ │ ├── CheckBoxPreference.java │ │ │ ├── ChoicePreference.java │ │ │ └── SliderPreference.java │ │ │ └── rvp │ │ │ ├── RecyclerViewPager.java │ │ │ ├── RecyclerViewPagerAdapter.java │ │ │ └── RecyclerViewUtils.java │ │ └── utils │ │ ├── AESCrypt.java │ │ ├── CollectionUtils.java │ │ ├── ComicUtils.java │ │ ├── DecryptionUtils.java │ │ ├── DocumentUtils.java │ │ ├── FrescoUtils.java │ │ ├── HintUtils.java │ │ ├── HttpUtils.java │ │ ├── JMTTUtil.kt │ │ ├── LogUtil.java │ │ ├── Logger.java │ │ ├── PermissionUtils.java │ │ ├── RxUtils.java │ │ ├── ServiceUtils.java │ │ ├── StringUtils.java │ │ ├── ThemeUtils.java │ │ ├── UicodeBackslashU.java │ │ ├── UrlEncodeUtils.java │ │ ├── interpretationUtils.java │ │ └── pictureUtils.java │ └── res │ ├── drawable-hdpi │ ├── ic_about_black_24dp.png │ ├── ic_account_box_black_24dp.png │ ├── ic_account_box_white_24dp.png │ ├── ic_add_white_24dp.png │ ├── ic_brightness_4_black_24dp.png │ ├── ic_chat_bubble_black_24dp.png │ ├── ic_chat_bubble_white_24dp.png │ ├── ic_class_black_24dp.png │ ├── ic_clear_white_24dp.png │ ├── ic_delete_white_24dp.png │ ├── ic_done_all_white_24dp.png │ ├── ic_done_white_24dp.png │ ├── ic_favorite_border_white_24dp.png │ ├── ic_favorite_white_24dp.png │ ├── ic_file_download_white_24dp.png │ ├── ic_filter_list_white_24dp.png │ ├── ic_history_black_18dp.png │ ├── ic_history_white_18dp.png │ ├── ic_history_white_24dp.png │ ├── ic_import_contacts_black_24dp.png │ ├── ic_launch_white_24dp.png │ ├── ic_local_cafe_white_24dp.png │ ├── ic_navigate_before_white_24dp.png │ ├── ic_pause_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_replay_white_24dp.png │ ├── ic_save_black_24dp.png │ ├── ic_search_white_24dp.png │ ├── ic_settings_black_24dp.png │ ├── ic_share_black_24dp.png │ ├── ic_share_white_24dp.png │ ├── ic_swap_vert_white_24dp.png │ ├── ic_sync_white_24dp.png │ └── ic_widgets_black_24dp.png │ ├── drawable-xhdpi │ ├── ic_about_black_24dp.png │ ├── ic_account_box_black_24dp.png │ ├── ic_account_box_white_24dp.png │ ├── ic_add_white_24dp.png │ ├── ic_brightness_4_black_24dp.png │ ├── ic_chat_bubble_black_24dp.png │ ├── ic_chat_bubble_white_24dp.png │ ├── ic_class_black_24dp.png │ ├── ic_clear_white_24dp.png │ ├── ic_delete_white_24dp.png │ ├── ic_done_all_white_24dp.png │ ├── ic_done_white_24dp.png │ ├── ic_favorite_border_white_24dp.png │ ├── ic_favorite_white_24dp.png │ ├── ic_file_download_white_24dp.png │ ├── ic_filter_list_white_24dp.png │ ├── ic_history_black_18dp.png │ ├── ic_history_white_18dp.png │ ├── ic_history_white_24dp.png │ ├── ic_import_contacts_black_24dp.png │ ├── ic_launch_white_24dp.png │ ├── ic_local_cafe_white_24dp.png │ ├── ic_navigate_before_white_24dp.png │ ├── ic_pause_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_replay_white_24dp.png │ ├── ic_save_black_24dp.png │ ├── ic_search_white_24dp.png │ ├── ic_settings_black_24dp.png │ ├── ic_share_black_24dp.png │ ├── ic_share_white_24dp.png │ ├── ic_swap_vert_white_24dp.png │ ├── ic_sync_white_24dp.png │ └── ic_widgets_black_24dp.png │ ├── drawable-xxhdpi │ ├── ic_about_black_24dp.png │ ├── ic_account_box_black_24dp.png │ ├── ic_account_box_white_24dp.png │ ├── ic_add_white_24dp.png │ ├── ic_brightness_4_black_24dp.png │ ├── ic_chat_bubble_black_24dp.png │ ├── ic_chat_bubble_white_24dp.png │ ├── ic_class_black_24dp.png │ ├── ic_clear_white_24dp.png │ ├── ic_delete_white_24dp.png │ ├── ic_done_all_white_24dp.png │ ├── ic_done_white_24dp.png │ ├── ic_favorite_border_white_24dp.png │ ├── ic_favorite_white_24dp.png │ ├── ic_file_download_white_24dp.png │ ├── ic_filter_list_white_24dp.png │ ├── ic_history_black_18dp.png │ ├── ic_history_white_18dp.png │ ├── ic_history_white_24dp.png │ ├── ic_import_contacts_black_24dp.png │ ├── ic_launch_white_24dp.png │ ├── ic_local_cafe_white_24dp.png │ ├── ic_navigate_before_white_24dp.png │ ├── ic_pause_white_24dp.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_replay_white_24dp.png │ ├── ic_save_black_24dp.png │ ├── ic_search_white_24dp.png │ ├── ic_settings_black_24dp.png │ ├── ic_share_black_24dp.png │ ├── ic_share_white_24dp.png │ ├── ic_swap_vert_white_24dp.png │ ├── ic_sync_white_24dp.png │ └── ic_widgets_black_24dp.png │ ├── drawable │ ├── cimoc.jpg │ ├── ic_dialog_download_top_3.png │ └── reader_progress.xml │ ├── layout │ ├── activity_about.xml │ ├── activity_backup.xml │ ├── activity_browser_filter.xml │ ├── activity_category.xml │ ├── activity_chapter.xml │ ├── activity_coordinator.xml │ ├── activity_event.xml │ ├── activity_main.xml │ ├── activity_page_reader.xml │ ├── activity_part_favorite.xml │ ├── activity_reader_config.xml │ ├── activity_result.xml │ ├── activity_search.xml │ ├── activity_settings.xml │ ├── activity_source_detail.xml │ ├── activity_stream_reader.xml │ ├── custom_back_btn.xml │ ├── custom_drawer_header.xml │ ├── custom_night_mask.xml │ ├── custom_option.xml │ ├── custom_option_checkbox.xml │ ├── custom_progress_bar.xml │ ├── custom_reader_info.xml │ ├── custom_seek_bar.xml │ ├── custom_toolbar.xml │ ├── dialog_editor.xml │ ├── dialog_progress.xml │ ├── dialog_slider.xml │ ├── dialog_update.xml │ ├── fragment_comic.xml │ ├── fragment_grid.xml │ ├── fragment_page_config.xml │ ├── fragment_recycler_view.xml │ ├── fragment_stream_config.xml │ ├── item_chapter.xml │ ├── item_chapter_header.xml │ ├── item_dir.xml │ ├── item_grid.xml │ ├── item_grid_ad.xml │ ├── item_loading.xml │ ├── item_picture.xml │ ├── item_picture_stream.xml │ ├── item_result.xml │ ├── item_result_ad.xml │ ├── item_select.xml │ ├── item_select_mutil.xml │ ├── item_source.xml │ ├── item_spinner.xml │ ├── item_tag.xml │ ├── item_task.xml │ └── listview_adapter.xml │ ├── menu │ ├── menu_chapter.xml │ ├── menu_comic.xml │ ├── menu_detail.xml │ ├── menu_main.xml │ ├── menu_part_favorite.xml │ ├── menu_search.xml │ ├── menu_source.xml │ ├── menu_tag.xml │ └── menu_task.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ ├── ic_launcher_blue_foreground.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ ├── ic_launcher_blue_foreground.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ ├── ic_launcher_blue_foreground.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_blue_foreground.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_blue_foreground.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── values-v19 │ └── styles.xml │ ├── values-v29 │ └── styles.xml │ ├── values-zh-rTW │ └── strings.xml │ ├── values │ ├── arrays.xml │ ├── attrs.xml │ ├── colors.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ ├── file_paths_public.xml │ └── remote_config.xml ├── build.gradle ├── category.py ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hellovr10.jks ├── ic_launcher_foreground.xcf ├── screenshot ├── 01.png └── icon.png └── settings.gradle /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [Haleydu] 2 | custom: ["https://www.paypal.me/haleydu"] 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/comic-source-issues.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: comic source issues 3 | about: 漫画源问题. 4 | title: "[CS]" 5 | labels: 漫画源问题 6 | assignees: '' 7 | 8 | --- 9 | 10 | # 这是一个漫画源问题 11 | 12 | > 漫画源工作情况可以在[project](https://github.com/Haleydu/Cimoc/projects/1)中进行查看,请尽量不要重复 13 | > 请您在提交本问题前仔细完成下面问题以便更好地解决问题. 14 | > 如果有多个漫画源出错,请不要合并在一起,谢谢 15 | 16 | ## 出现错误的漫画源 17 | 18 | ## 您搜索/观看的漫画名称或关键字以及访问链接 19 | 20 | ## 在以下环节中出现错误 21 | - [ ] 搜索 22 | - [ ] 章节信息 23 | - [ ] 图片加载 24 | 25 | ## 你是否使用科学上网工具 26 | - [ ] 是 27 | - [ ] 否 28 | 29 | ## 你是否能够访问漫画源网页并成功加载漫画图片 30 | - [ ] 是 31 | - [ ] 否 32 | 33 | ## 您手机的系统版本 34 | - [ ] 原生(AOSP/LL/RR/Mokee等) 35 | - [ ] 国产(小米/氢氧/锤子) 36 | 具体版本: 37 | 38 | ## 您使用的cimoc版本 39 | - [ ] v1.5.4 40 | - [ ] v1.5.5 41 | - [ ] v1.5.6 42 | - [ ] v1.5.7 43 | 具体版本: 44 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 60 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. 8 | daysUntilClose: 7 9 | 10 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 11 | exemptLabels: 12 | - pinned 13 | - security 14 | - "[Status] Maybe Later" 15 | 16 | # Set to true to ignore issues in a project (defaults to false) 17 | exemptProjects: false 18 | 19 | # Set to true to ignore issues in a milestone (defaults to false) 20 | exemptMilestones: false 21 | 22 | # Label to use when marking as stale 23 | staleLabel: wontfix 24 | 25 | # Comment to post when marking as stale. Set to `false` to disable 26 | markComment: > 27 | This issue has been automatically marked as stale because it has not had 28 | recent activity. It will be closed if no further activity occurs. Thank you 29 | for your contributions. 30 | 31 | # Comment to post when removing the stale label. 32 | # unmarkComment: > 33 | # Your comment here. 34 | 35 | # Comment to post when closing a stale Issue or Pull Request. 36 | # closeComment: > 37 | # Your comment here. 38 | 39 | # Limit the number of actions per hour, from 1-30. Default is 30 40 | limitPerRun: 30 41 | 42 | # Limit to only `issues` or `pulls` 43 | # only: issues 44 | 45 | # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': 46 | # pulls: 47 | # daysUntilStale: 30 48 | # markComment: > 49 | # This pull request has been automatically marked as stale because it has not had 50 | # recent activity. It will be closed if no further activity occurs. Thank you 51 | # for your contributions. 52 | 53 | # issues: 54 | # exemptLabels: 55 | # - confirmed -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle files 2 | .gradle/ 3 | build/ 4 | 5 | # Built application files 6 | *.apk 7 | *.ap_ 8 | 9 | # Intellij 10 | *.iml 11 | .idea/ 12 | 13 | # Local configuration file (sdk path, etc) 14 | local.properties 15 | /keystore.properties 16 | 17 | # Android Studio captures folder 18 | captures/ 19 | 20 | # Keystore files 21 | # *.jks 22 | 23 | # Android Studio Navigation editor temp files 24 | .navigation/ 25 | 26 | # Java class files 27 | *.class 28 | 29 | 30 | /gradle.properties 31 | /app/src/main/BrowserFilter-data.xml 32 | /app/debug/ 33 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | android: 3 | components: 4 | - tools 5 | - platform-tools 6 | - build-tools-29.0.3 7 | - android-29 8 | - add-on 9 | - extra 10 | licenses: 11 | - android-sdk-license-.+ 12 | before_install: 13 | - echo $TRAVIS_BUILD_NUMBER 14 | - yes | sdkmanager "platforms;android-29" 15 | jdk: 16 | - oraclejdk8 17 | before_script: 18 | - chmod +x gradlew 19 | - chmod +x .travis/build.sh 20 | script: 21 | #- "./gradlew assembleRelease" 22 | - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./gradlew assembleDebug; fi' 23 | - 'if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./gradlew assembleRelease; fi' 24 | - .travis/build.sh 25 | before_deploy: 26 | - echo gitVersion 27 | - git rev-list --all --count 28 | - echo version 29 | - git describe --tags 30 | - echo $TRAVIS_BUILD_NUMBER 31 | deploy: 32 | provider: releases 33 | api_key: 34 | secure: jTKF+LORoR5pXPd5XsVoRgtlx0vqMN8wuvuH680KT/AgrFh2usKIaBCUmM2KYYnwbnxT5lm5eX58lr22mVAn0OzajBGhiilWpQuoDcI3aU0vfki7awFILq/n3tnMvewtz4b89w9dDKPFz/AEdBd1W5gDr/y8A4VLpi6n7n8GPdq/8rk0LHJSxsgKVN9hpzXNBgDCxt2AzH20ZFcUaN7mgVbiL+cQC/9r+zNLkhBqph8TFGU//L+P5mbpVSvd2zJZHwJ27WGeWM5sndgilXEFi2HYVR/mJxqiVLqlnpI9i+e7TzRUoEcuWW8+UcDz4XcCOGMZFjNPgbT1kXwusNKrLU1Dh81qeseeFVZuGgA0DIXczvDTG/U/B4GMT3rIXL6W9eow+J8upZ4WfWkZe6gp57SpBt+FS5bqoiIN/pSp8Bur/NH2hVoCIYpReQ/8l43LF2EfgHSUibiPDiZpsHcihmZ5oZqXb4sxDEy6Rd4pVPr3BD54O46NYcjyATsLoCRI9IU4xEwv1W+Etw4FarMAW80AiS232X4B4MnQ7nm83BZkSI5/YbeqB5yOvK7jCwRoZCdQFUPmOWRC3sVTbNDlRdiY2oJWtE8WoiEIG3GIm/Qy+/9WyGmEuNb7BIy3PGlBEhzTbT//BXh06PJfg9+IkocecJrgTBNXOLkZPYO+BKs= 35 | file: 36 | - ApkInfo.json 37 | - app/build/outputs/apk/release/Cimoc*.apk 38 | file_glob: true 39 | on: 40 | repo: Haleydu/Cimoc 41 | branch: release-tci 42 | tags: true 43 | skip_cleanup: true 44 | notifications: 45 | webhooks: 46 | urls: 47 | - https://webhooks.gitter.im/e/0ecc6bd870c911bd6222 48 | on_success: always # options: [always|never|change] default: always 49 | on_failure: always # options: [always|never|change] default: always 50 | on_start: always # options: [always|never|change] default: always 51 | -------------------------------------------------------------------------------- /.travis/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | MD5=$(md5sum app/build/outputs/apk/release/Cimoc*.apk) 5 | VERSIONNAME=$(git describe --tags) 6 | printf "\n" 7 | printf "{" 8 | printf "\n" 9 | printf " versionCode:" 10 | printf $TRAVIS_BUILD_NUMBER 11 | printf "\n" 12 | printf " versionName:" 13 | printf $VERSIONNAME 14 | printf "\n" 15 | printf " md5:" 16 | printf $MD5 17 | printf "\n" 18 | printf "}" 19 | printf "\n" 20 | 21 | echo "{ 22 | versionCode:\"$TRAVIS_BUILD_NUMBER\" 23 | versionName:\"$VERSIONNAME\" 24 | md5:\"$MD5\" 25 | }" > ApkInfo.json 26 | 27 | printf "\n" 28 | cat ApkInfo.json -------------------------------------------------------------------------------- /app-ads.txt: -------------------------------------------------------------------------------- 1 | google.com, pub-4791741094576161, DIRECT, f08c47fec0942fa0 2 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /release 3 | /schemas -------------------------------------------------------------------------------- /app/.key.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/.key.jks -------------------------------------------------------------------------------- /app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "778433201097", 4 | "firebase_url": "https://cimoc-22552.firebaseio.com", 5 | "project_id": "cimoc-22552", 6 | "storage_bucket": "cimoc-22552.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:778433201097:android:2f14f48813d48d02abde18", 12 | "android_client_info": { 13 | "package_name": "com.haleydu.cimoc" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "778433201097-u4crr7e5v7gin8lprnqd3hgbrdfu1jso.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyAPbQeXVQxcva6uNfReARSZ8WnNQza7HQU" 25 | } 26 | ], 27 | "services": { 28 | "appinvite_service": { 29 | "other_platform_oauth_client": [ 30 | { 31 | "client_id": "778433201097-u4crr7e5v7gin8lprnqd3hgbrdfu1jso.apps.googleusercontent.com", 32 | "client_type": 3 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ], 39 | "configuration_version": "1" 40 | } -------------------------------------------------------------------------------- /app/libs/commons-lang3-3.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/libs/commons-lang3-3.7.jar -------------------------------------------------------------------------------- /app/libs/jcc-bate-0.7.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/libs/jcc-bate-0.7.3.jar -------------------------------------------------------------------------------- /app/libs/rhino-1.7.13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/libs/rhino-1.7.13.jar -------------------------------------------------------------------------------- /app/src/androidTest/java/com/haleydu/cimoc/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc; 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/assets/easygo.json: -------------------------------------------------------------------------------- 1 | { 2 | "easyGoVersion": "1.0", 3 | "client": "com.haleydu.cimoc", 4 | "logicEntities": [ 5 | { 6 | "head": { 7 | "function": "magicwindow", 8 | "required": "true" 9 | }, 10 | "body": { 11 | "mode": "1", 12 | "activityPairs": [ 13 | { 14 | "from": "com.haleydu.cimoc.ui.activity.MainActivity", 15 | "to": "*" 16 | }, 17 | { 18 | "from": "com.haleydu.cimoc.ui.activity.ResultActivity", 19 | "to": "com.haleydu.cimoc.ui.activity.DetailActivity" 20 | } 21 | ], 22 | "Activities": [ 23 | { 24 | "name": "com.haleydu.cimoc.ui.activity.PageReaderActivity", 25 | "defaultFullScreen": "true" 26 | } 27 | ], 28 | "UX": { 29 | "supportRotationUxCompat": "true", 30 | "isDraggable": "false", 31 | "supportDraggingToFullScreen": "PAD|FOLD" 32 | } 33 | } 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/Constants.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc; 2 | 3 | public final class Constants { 4 | 5 | public static final int VERSION = 105006; 6 | 7 | public static final String UPDATE_GITHUB_URL = "https://api.github.com/repos/Haleydu/Cimoc/releases/latest"; 8 | 9 | public static final String UPDATE_GITEE_URL = "https://gitee.com/api/v5/repos/Haleydu/Cimoc_Mirror/releases/latest"; 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/component/AppGetter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.component; 2 | 3 | import com.haleydu.cimoc.App; 4 | 5 | /** 6 | * Created by Hiroshi on 2017/1/21. 7 | */ 8 | 9 | public interface AppGetter { 10 | 11 | App getAppInstance(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/component/DialogCaller.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.component; 2 | 3 | import android.os.Bundle; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/12/4. 7 | */ 8 | 9 | public interface DialogCaller { 10 | 11 | String EXTRA_DIALOG_RESULT_INDEX = "cimoc.intent.extra.EXTRA_DIALOG_RESULT_INDEX"; 12 | String EXTRA_DIALOG_RESULT_VALUE = "cimoc.intent.extra.EXTRA_DIALOG_RESULT_VALUE"; 13 | String EXTRA_DIALOG_REQUEST_CODE = "cimoc.intent.extra.EXTRA_DIALOG_REQUEST_CODE"; 14 | String EXTRA_DIALOG_TITLE = "cimoc.intent.extra.EXTRA_DIALOG_TITLE"; 15 | String EXTRA_DIALOG_ITEMS = "cimoc.intent.extra.EXTRA_DIALOG_ITEMS"; 16 | String EXTRA_DIALOG_CONTENT = "cimoc.intent.extra.EXTRA_DIALOG_CONTENT"; 17 | String EXTRA_DIALOG_CONTENT_TEXT = "cimoc.intent.extra.EXTRA_DIALOG_CONTENT_TEXT"; 18 | String EXTRA_DIALOG_NEGATIVE = "cimoc.intent.extra.EXTRA_DIALOG_NEGATIVE"; 19 | String EXTRA_DIALOG_CHOICE_ITEMS = "cimoc.intent.extra.EXTRA_DIALOG_CHOICE_ITEMS"; 20 | 21 | void onDialogResult(int requestCode, Bundle bundle); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/component/ThemeResponsive.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.component; 2 | 3 | import androidx.annotation.ColorRes; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/12/2. 7 | */ 8 | 9 | public interface ThemeResponsive { 10 | 11 | void onThemeChange(@ColorRes int primary, @ColorRes int accent); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/core/UpdateJson.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.core; 2 | 3 | public class UpdateJson { 4 | 5 | private String versionName; 6 | private int versionCode; 7 | private String content; 8 | private String md5; 9 | private String url; 10 | 11 | public String getVersionName() { 12 | return versionName; 13 | } 14 | 15 | public int getVersionCode() { 16 | return versionCode; 17 | } 18 | 19 | public String getContent() { 20 | return content; 21 | } 22 | 23 | public void setContent(String content) { 24 | this.content = content; 25 | } 26 | 27 | public String getMd5() { 28 | return md5; 29 | } 30 | 31 | public String getUrl() { 32 | return url; 33 | } 34 | 35 | public void setUrl(String url) { 36 | this.url = url; 37 | } 38 | 39 | public void setVersionName(String versionName) { 40 | this.versionName = versionName; 41 | } 42 | 43 | public void setVersionCode(int versionCode) { 44 | this.versionCode = versionCode; 45 | } 46 | 47 | public void setMd5(String md5) { 48 | this.md5 = md5; 49 | } 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/fresco/ControllerBuilderSupplierFactory.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.fresco; 2 | 3 | import android.content.Context; 4 | 5 | import com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilder; 6 | import com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier; 7 | import com.facebook.imagepipeline.core.ImagePipelineFactory; 8 | 9 | import okhttp3.Headers; 10 | 11 | /** 12 | * Created by Hiroshi on 2016/9/5. 13 | */ 14 | public class ControllerBuilderSupplierFactory { 15 | 16 | public static PipelineDraweeControllerBuilderSupplier get(Context context, ImagePipelineFactory factory) { 17 | return new PipelineDraweeControllerBuilderSupplier(context.getApplicationContext(), factory, null); 18 | } 19 | 20 | public static PipelineDraweeControllerBuilder get(Context context, Headers header) { 21 | ImagePipelineFactory factory = ImagePipelineFactoryBuilder.build(context, header, false); 22 | return new PipelineDraweeControllerBuilderSupplier(context.getApplicationContext(), factory, null).get(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/fresco/ImagePipelineFactoryBuilder.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.fresco; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | 6 | import com.facebook.imagepipeline.core.ImagePipelineConfig; 7 | import com.facebook.imagepipeline.core.ImagePipelineFactory; 8 | import com.haleydu.cimoc.App; 9 | 10 | import okhttp3.Headers; 11 | 12 | /** 13 | * Created by Hiroshi on 2016/7/8. 14 | */ 15 | public class ImagePipelineFactoryBuilder { 16 | 17 | public static ImagePipelineFactory build(Context context, Headers header, boolean down) { 18 | ImagePipelineConfig.Builder builder = 19 | ImagePipelineConfig.newBuilder(context.getApplicationContext()) 20 | .setDownsampleEnabled(down) 21 | .setBitmapsConfig(down ? Bitmap.Config.RGB_565 : Bitmap.Config.ARGB_8888); 22 | if (header != null) { 23 | builder.setNetworkFetcher(new OkHttpNetworkFetcher(App.getHttpClient(), header)); 24 | } 25 | return new ImagePipelineFactory(builder.build()); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/fresco/processor/BinaryPostprocessor.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.fresco.processor; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import com.facebook.cache.common.CacheKey; 6 | import com.facebook.cache.common.SimpleCacheKey; 7 | import com.facebook.common.references.CloseableReference; 8 | import com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory; 9 | import com.facebook.imagepipeline.request.BasePostprocessor; 10 | 11 | /** 12 | * 二值化处理 仅用于测试 13 | * Created by Hiroshi on 2017/1/10. 14 | */ 15 | 16 | public class BinaryPostprocessor extends BasePostprocessor { 17 | 18 | private String url; 19 | 20 | public BinaryPostprocessor(String url) { 21 | this.url = url; 22 | } 23 | 24 | @Override 25 | public CloseableReference process(Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory) { 26 | int width = sourceBitmap.getWidth(); 27 | int height = sourceBitmap.getHeight(); 28 | 29 | int[] pixels = new int[width * height]; 30 | sourceBitmap.getPixels(pixels, 0, width, 0, 0, width, height); 31 | 32 | for (int i = 0; i < height; ++i) { 33 | for (int j = 0; j < width; ++j) { 34 | int pixel = pixels[i * width + j]; 35 | int red = ((pixel & 0x00FF0000) >> 16); 36 | int green = ((pixel & 0x0000FF00) >> 8); 37 | int blue = (pixel & 0x000000FF); 38 | int gray = red * 30 + green * 59 + blue * 11; 39 | pixels[i * width + j] = gray > 21500 ? 0xFFFFFF : 0x000000; 40 | } 41 | } 42 | 43 | CloseableReference reference = bitmapFactory.createBitmap(width, height, Bitmap.Config.RGB_565); 44 | try { 45 | Bitmap bitmap = reference.get(); 46 | bitmap.setPixels(pixels, 0, width, 0, 0, width, height); 47 | return CloseableReference.cloneOrNull(reference); 48 | } finally { 49 | CloseableReference.closeSafely(reference); 50 | } 51 | } 52 | 53 | @Override 54 | public CacheKey getPostprocessorCacheKey() { 55 | return new SimpleCacheKey(url.concat("binary")); 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/global/Extra.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.global; 2 | 3 | /** 4 | * Created by Hiroshi on 2016/12/25. 5 | */ 6 | 7 | public class Extra { 8 | 9 | public static final String EXTRA_CHAPTER = "cimoc.intent.extra.EXTRA_CHAPTER"; 10 | public static final String EXTRA_TASK = "cimoc.intent.extra.EXTRA_TASK"; 11 | public static final String EXTRA_ID = "cimoc.intent.extra.EXTRA_ID"; 12 | public static final String EXTRA_SOURCE = "cimoc.intent.extra.EXTRA_SOURCE"; 13 | public static final String EXTRA_CID = "cimoc.intent.extra.EXTRA_CID"; 14 | public static final String EXTRA_KEYWORD = "cimoc.intent.extra.EXTRA_KEYWORD"; 15 | public static final String EXTRA_STRICT = "cimoc.intent.extra.EXTRA_STRICT"; 16 | public static final String EXTRA_MODE = "cimoc.intent.extra.EXTRA_MODE"; 17 | public static final String EXTRA_PICKER_PATH = "cimoc.intent.extra.EXTRA_PICKER_PATH"; 18 | public static final String EXTRA_RESULT = "cimoc.intent.extra.EXTRA_RESULT"; 19 | public static final String EXTRA_IS_LONG = "cimoc.intent.extra.EXTRA_IS_LONG"; 20 | public static final String EXTRA_IS_PORTRAIT = "cimoc.intent.extra.EXTRA_IS_PORTRAIT"; 21 | public static final String EXTRA_IS_STREAM = "cimoc.intent.extra.EXTRA_IS_STREAM"; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/global/FastClick.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.global; 2 | 3 | /** 4 | * Created by Hiroshi on 2016/12/1. 5 | */ 6 | 7 | public class FastClick { 8 | 9 | private static long last = 0; 10 | 11 | public static boolean isClickValid() { 12 | long cur = System.currentTimeMillis(); 13 | boolean valid = cur - last > 400; 14 | if (valid) { 15 | last = cur; 16 | } 17 | return valid; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/manager/TagManager.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.manager; 2 | 3 | import com.haleydu.cimoc.component.AppGetter; 4 | import com.haleydu.cimoc.model.Tag; 5 | import com.haleydu.cimoc.model.TagDao; 6 | 7 | import java.util.List; 8 | 9 | import rx.Observable; 10 | 11 | /** 12 | * Created by Hiroshi on 2016/10/10. 13 | */ 14 | 15 | public class TagManager { 16 | 17 | public static final long TAG_CONTINUE = -101; 18 | public static final long TAG_FINISH = -100; 19 | 20 | private static TagManager mInstance; 21 | 22 | private TagDao mTagDao; 23 | 24 | private TagManager(AppGetter getter) { 25 | mTagDao = getter.getAppInstance().getDaoSession().getTagDao(); 26 | } 27 | 28 | public static TagManager getInstance(AppGetter getter) { 29 | if (mInstance == null) { 30 | synchronized (TagManager.class) { 31 | if (mInstance == null) { 32 | mInstance = new TagManager(getter); 33 | } 34 | } 35 | } 36 | return mInstance; 37 | } 38 | 39 | public List list() { 40 | return mTagDao.queryBuilder().list(); 41 | } 42 | 43 | public Observable> listInRx() { 44 | return mTagDao.queryBuilder() 45 | .rx() 46 | .list(); 47 | } 48 | 49 | public Tag load(String title) { 50 | return mTagDao.queryBuilder() 51 | .where(TagDao.Properties.Title.eq(title)) 52 | .limit(1) 53 | .unique(); 54 | } 55 | 56 | public void insert(Tag tag) { 57 | long id = mTagDao.insert(tag); 58 | tag.setId(id); 59 | } 60 | 61 | public void update(Tag tag) { 62 | mTagDao.update(tag); 63 | } 64 | 65 | public void delete(Tag entity) { 66 | mTagDao.delete(entity); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/misc/ActivityLifecycle.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.misc; 2 | 3 | import android.app.Activity; 4 | import android.app.Application; 5 | import android.os.Bundle; 6 | 7 | import java.util.LinkedList; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Hiroshi on 2018/2/13. 12 | */ 13 | 14 | public class ActivityLifecycle implements Application.ActivityLifecycleCallbacks { 15 | 16 | private List mActivityList; 17 | 18 | public ActivityLifecycle() { 19 | mActivityList = new LinkedList<>(); 20 | } 21 | 22 | public void clear() { 23 | for (Activity activity : mActivityList) { 24 | activity.finish(); 25 | } 26 | mActivityList.clear(); 27 | } 28 | 29 | @Override 30 | public void onActivityCreated(Activity activity, Bundle savedInstanceState) { 31 | mActivityList.add(activity); 32 | } 33 | 34 | @Override 35 | public void onActivityStarted(Activity activity) { 36 | } 37 | 38 | @Override 39 | public void onActivityResumed(Activity activity) { 40 | } 41 | 42 | @Override 43 | public void onActivityPaused(Activity activity) { 44 | } 45 | 46 | @Override 47 | public void onActivityStopped(Activity activity) { 48 | } 49 | 50 | @Override 51 | public void onActivitySaveInstanceState(Activity activity, Bundle outState) { 52 | } 53 | 54 | @Override 55 | public void onActivityDestroyed(Activity activity) { 56 | mActivityList.remove(activity); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/misc/NotificationWrapper.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.misc; 2 | 3 | import android.app.NotificationChannel; 4 | import android.app.NotificationManager; 5 | import android.content.Context; 6 | import android.graphics.BitmapFactory; 7 | import android.graphics.drawable.Drawable; 8 | import android.os.Build; 9 | import androidx.annotation.DrawableRes; 10 | import androidx.core.app.NotificationCompat; 11 | 12 | import com.haleydu.cimoc.App; 13 | import com.haleydu.cimoc.R; 14 | 15 | /** 16 | * Created by Hiroshi on 2018/2/11. 17 | */ 18 | 19 | public class NotificationWrapper { 20 | 21 | private NotificationManager mManager; 22 | private NotificationCompat.Builder mBuilder; 23 | private int mId; 24 | 25 | public NotificationWrapper(Context context, String id, @DrawableRes int icon, boolean ongoing) { 26 | String title = context.getString(R.string.app_name); 27 | mManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 28 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 29 | mManager.createNotificationChannel(new NotificationChannel(id, id, NotificationManager.IMPORTANCE_MIN)); 30 | } 31 | mBuilder = new NotificationCompat.Builder(context, id); 32 | mBuilder.setContentTitle(title) 33 | .setSmallIcon(R.mipmap.ic_launcher_round) 34 | .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), icon)) 35 | .setOngoing(ongoing); 36 | mId = id.hashCode(); 37 | } 38 | 39 | public void post(int progress, int max) { 40 | mBuilder.setProgress(max, progress, false); 41 | mManager.notify(mId, mBuilder.build()); 42 | } 43 | 44 | public void post(String content, int progress, int max) { 45 | mBuilder.setContentText(content).setTicker(content); 46 | post(progress, max); 47 | } 48 | 49 | public void post(String content, boolean ongoing) { 50 | mBuilder.setOngoing(ongoing); 51 | post(content, 0, 0); 52 | } 53 | 54 | public void cancel() { 55 | mManager.cancel(mId); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/misc/Switcher.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.misc; 2 | 3 | /** 4 | * Created by Hiroshi on 2017/9/29. 5 | */ 6 | 7 | public class Switcher { 8 | 9 | private T element; 10 | private boolean enable; 11 | 12 | public Switcher(T element, boolean enable) { 13 | this.element = element; 14 | this.enable = enable; 15 | } 16 | 17 | public T getElement() { 18 | return element; 19 | } 20 | 21 | public void setElement(T element) { 22 | this.element = element; 23 | } 24 | 25 | public boolean isEnable() { 26 | return enable; 27 | } 28 | 29 | public void setEnable(boolean enable) { 30 | this.enable = enable; 31 | } 32 | 33 | public void switchEnable() { 34 | this.enable = !this.enable; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/model/Source.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.model; 2 | 3 | import org.greenrobot.greendao.annotation.Entity; 4 | import org.greenrobot.greendao.annotation.Generated; 5 | import org.greenrobot.greendao.annotation.Id; 6 | import org.greenrobot.greendao.annotation.NotNull; 7 | import org.greenrobot.greendao.annotation.Unique; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/8/11. 11 | */ 12 | @Entity 13 | public class Source { 14 | 15 | @Id 16 | private Long id; 17 | @NotNull 18 | private String title; 19 | @Unique 20 | private int type; 21 | @NotNull 22 | private boolean enable; 23 | 24 | @Generated(hash = 615387317) 25 | public Source() { 26 | } 27 | 28 | @Generated(hash = 1339691905) 29 | public Source(Long id, @NotNull String title, int type, boolean enable) { 30 | this.id = id; 31 | this.title = title; 32 | this.type = type; 33 | this.enable = enable; 34 | } 35 | 36 | @Override 37 | public boolean equals(Object o) { 38 | return o instanceof Source && ((Source) o).id.equals(id); 39 | } 40 | 41 | @Override 42 | public int hashCode() { 43 | return id == null ? super.hashCode() : id.hashCode(); 44 | } 45 | 46 | public Long getId() { 47 | return this.id; 48 | } 49 | 50 | public void setId(Long id) { 51 | this.id = id; 52 | } 53 | 54 | public String getTitle() { 55 | return this.title; 56 | } 57 | 58 | public void setTitle(String title) { 59 | this.title = title; 60 | } 61 | 62 | public int getType() { 63 | return this.type; 64 | } 65 | 66 | public void setType(int type) { 67 | this.type = type; 68 | } 69 | 70 | public boolean getEnable() { 71 | return this.enable; 72 | } 73 | 74 | public void setEnable(boolean enable) { 75 | this.enable = enable; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/model/Tag.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.model; 2 | 3 | import org.greenrobot.greendao.annotation.Entity; 4 | import org.greenrobot.greendao.annotation.Generated; 5 | import org.greenrobot.greendao.annotation.Id; 6 | import org.greenrobot.greendao.annotation.NotNull; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/10. 10 | */ 11 | @Entity 12 | public class Tag { 13 | 14 | @Id(autoincrement = true) 15 | private Long id; 16 | @NotNull 17 | private String title; 18 | 19 | @Generated(hash = 836804519) 20 | public Tag(Long id, @NotNull String title) { 21 | this.id = id; 22 | this.title = title; 23 | } 24 | 25 | @Generated(hash = 1605720318) 26 | public Tag() { 27 | } 28 | 29 | @Override 30 | public boolean equals(Object o) { 31 | return o instanceof Tag && ((Tag) o).id.equals(id); 32 | } 33 | 34 | @Override 35 | public int hashCode() { 36 | return id == null ? super.hashCode() : id.hashCode(); 37 | } 38 | 39 | public Long getId() { 40 | return this.id; 41 | } 42 | 43 | public void setId(Long id) { 44 | this.id = id; 45 | } 46 | 47 | public String getTitle() { 48 | return this.title; 49 | } 50 | 51 | public void setTitle(String title) { 52 | this.title = title; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/model/TagRef.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.model; 2 | 3 | import org.greenrobot.greendao.annotation.Entity; 4 | import org.greenrobot.greendao.annotation.Generated; 5 | import org.greenrobot.greendao.annotation.Id; 6 | import org.greenrobot.greendao.annotation.NotNull; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/10. 10 | */ 11 | @Entity 12 | public class TagRef { 13 | 14 | @Id(autoincrement = true) 15 | private Long id; 16 | @NotNull 17 | private long tid; 18 | @NotNull 19 | private long cid; 20 | 21 | @Generated(hash = 1744842042) 22 | public TagRef(Long id, long tid, long cid) { 23 | this.id = id; 24 | this.tid = tid; 25 | this.cid = cid; 26 | } 27 | 28 | @Generated(hash = 942776696) 29 | public TagRef() { 30 | } 31 | 32 | public Long getId() { 33 | return this.id; 34 | } 35 | 36 | public void setId(Long id) { 37 | this.id = id; 38 | } 39 | 40 | public long getTid() { 41 | return this.tid; 42 | } 43 | 44 | public void setTid(long tid) { 45 | this.tid = tid; 46 | } 47 | 48 | public long getCid() { 49 | return this.cid; 50 | } 51 | 52 | public void setCid(long cid) { 53 | this.cid = cid; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/network/DNSHelper.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.network; 2 | 3 | public class DNSHelper { 4 | 5 | static public String getIpByHost(String hostname) { 6 | switch (hostname) { 7 | // case "m.manhuagui.com": 8 | // case "tw.manhuagui.com": 9 | // return "47.89.23.88"; 10 | // case "www.manhuagui.com": 11 | // return "14.49.38.185"; 12 | //return "106.185.40.107"; 13 | default: 14 | return null; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/network/HttpDns.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.network; 2 | 3 | import android.util.Log; 4 | 5 | import java.net.InetAddress; 6 | import java.net.UnknownHostException; 7 | import java.util.Arrays; 8 | import java.util.List; 9 | 10 | import okhttp3.Dns; 11 | 12 | public class HttpDns implements Dns { 13 | private static final Dns SYSTEM = Dns.SYSTEM; 14 | 15 | @Override 16 | public List lookup(String hostname) throws UnknownHostException { 17 | Log.e("HttpDns", "lookup:" + hostname); 18 | String ip = DNSHelper.getIpByHost(hostname); 19 | if (ip != null && !ip.equals("")) { 20 | List inetAddresses = Arrays.asList(InetAddress.getAllByName(ip)); 21 | Log.e("HttpDns", "inetAddresses:" + inetAddresses); 22 | return inetAddresses; //返回自己解析的地址列表 23 | } 24 | return SYSTEM.lookup(hostname); //走系统的dns列表 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/parser/Category.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.parser; 2 | 3 | import androidx.annotation.IntDef; 4 | import android.util.Pair; 5 | 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/12/10. 12 | */ 13 | 14 | public interface Category { 15 | 16 | /** 17 | * 主题 地区 读者 年份 进度 排序 18 | * TODO 根据不同图源定制类别 19 | */ 20 | int CATEGORY_SUBJECT = 0; 21 | int CATEGORY_AREA = 1; 22 | int CATEGORY_READER = 2; 23 | int CATEGORY_YEAR = 3; 24 | int CATEGORY_PROGRESS = 4; 25 | int CATEGORY_ORDER = 5; 26 | 27 | /** 28 | * 选项是否可以组合,例如有些网站可以根据几个选项一起搜索 29 | */ 30 | boolean isComposite(); 31 | 32 | /** 33 | * 获取最终的格式化字符串,一般需要含有一个 %d 用于填充页码 34 | * TODO 这里不要返回 String 返回数组 35 | * 36 | * @param args 各个选项的值,按照定义的顺序 37 | */ 38 | String getFormat(String... args); 39 | 40 | /** 41 | * 判断是否存在某个选项,用于确定界面中的 Spinner 42 | */ 43 | boolean hasAttribute(@Attribute int attr); 44 | 45 | /** 46 | * 获取选项列表 47 | * 左边的 String 为显示的名称,右边的 String 为用来构造 url 的值 48 | */ 49 | List> getAttrList(@Attribute int attr); 50 | 51 | @IntDef({CATEGORY_SUBJECT, CATEGORY_AREA, CATEGORY_READER, CATEGORY_YEAR, CATEGORY_PROGRESS, CATEGORY_ORDER}) 52 | @Retention(RetentionPolicy.SOURCE) 53 | @interface Attribute { 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/parser/JsonIterator.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.parser; 2 | 3 | import com.haleydu.cimoc.model.Comic; 4 | 5 | import org.json.JSONArray; 6 | import org.json.JSONException; 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/9/21. 11 | */ 12 | 13 | public abstract class JsonIterator implements SearchIterator { 14 | 15 | private int index; 16 | private JSONArray array; 17 | 18 | public JsonIterator(JSONArray array) { 19 | this.index = 0; 20 | this.array = array; 21 | } 22 | 23 | @Override 24 | public boolean hasNext() { 25 | return index < array.length(); 26 | } 27 | 28 | @Override 29 | public Comic next() { 30 | try { 31 | return parse(array.getJSONObject(index++)); 32 | } catch (JSONException e) { 33 | return null; 34 | } 35 | } 36 | 37 | @Override 38 | public boolean empty() { 39 | return array == null || array.length() == 0; 40 | } 41 | 42 | protected abstract Comic parse(JSONObject object) throws JSONException; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/parser/NodeIterator.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.parser; 2 | 3 | import com.haleydu.cimoc.model.Comic; 4 | import com.haleydu.cimoc.soup.Node; 5 | 6 | import java.util.List; 7 | import java.util.ListIterator; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/9/21. 11 | */ 12 | 13 | public abstract class NodeIterator implements SearchIterator { 14 | 15 | private ListIterator iterator; 16 | 17 | protected NodeIterator(List list) { 18 | this.iterator = list.isEmpty() ? null : list.listIterator(); 19 | } 20 | 21 | @Override 22 | public boolean hasNext() { 23 | return iterator.hasNext(); 24 | } 25 | 26 | @Override 27 | public Comic next() { 28 | return parse(iterator.next()); 29 | } 30 | 31 | @Override 32 | public boolean empty() { 33 | return iterator == null; 34 | } 35 | 36 | protected abstract Comic parse(Node node); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/parser/RegexIterator.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.parser; 2 | 3 | import com.haleydu.cimoc.model.Comic; 4 | import com.haleydu.cimoc.soup.Node; 5 | 6 | import java.util.List; 7 | import java.util.ListIterator; 8 | import java.util.regex.Matcher; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/9/21. 12 | */ 13 | 14 | public abstract class RegexIterator implements SearchIterator { 15 | 16 | private Matcher match; 17 | 18 | protected RegexIterator(Matcher match) { 19 | this.match = match; 20 | } 21 | 22 | @Override 23 | public boolean hasNext() { 24 | return match.find(); 25 | } 26 | 27 | @Override 28 | public Comic next() { 29 | return parse(match); 30 | } 31 | 32 | @Override 33 | public boolean empty() { 34 | return false; 35 | } 36 | 37 | protected abstract Comic parse(Matcher match); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/parser/SearchIterator.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.parser; 2 | 3 | import com.haleydu.cimoc.model.Comic; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/9/21. 7 | */ 8 | 9 | public interface SearchIterator { 10 | 11 | boolean empty(); 12 | 13 | boolean hasNext(); 14 | 15 | Comic next(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/parser/UrlFilter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.parser; 2 | 3 | public class UrlFilter { 4 | public String Filter; 5 | public String Regex; 6 | public int Group; 7 | 8 | public UrlFilter(String filter) { 9 | Filter = filter; 10 | Regex = "(\\d+)"; 11 | Group = 1; 12 | } 13 | 14 | public UrlFilter(String filter, String regex) { 15 | Filter = filter; 16 | Regex = regex; 17 | Group = 1; 18 | } 19 | 20 | public UrlFilter(String filter, String regex, int group) { 21 | Filter = filter; 22 | Regex = regex; 23 | Group = group; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/presenter/AboutPresenter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.presenter; 2 | 3 | import com.haleydu.cimoc.core.Update; 4 | import com.haleydu.cimoc.ui.view.AboutView; 5 | 6 | import rx.android.schedulers.AndroidSchedulers; 7 | import rx.functions.Action1; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/8/24. 11 | */ 12 | public class AboutPresenter extends BasePresenter { 13 | 14 | public void checkUpdate(final String version) { 15 | mCompositeSubscription.add(Update.check() 16 | .observeOn(AndroidSchedulers.mainThread()) 17 | .subscribe(new Action1() { 18 | @Override 19 | public void call(String s) { 20 | if (version.equals(s)) { 21 | mBaseView.onUpdateNone(); 22 | } else { 23 | mBaseView.onUpdateReady(); 24 | } 25 | } 26 | }, new Action1() { 27 | @Override 28 | public void call(Throwable throwable) { 29 | mBaseView.onCheckError(); 30 | } 31 | })); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/presenter/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.presenter; 2 | 3 | import com.haleydu.cimoc.rx.RxBus; 4 | import com.haleydu.cimoc.rx.RxEvent; 5 | import com.haleydu.cimoc.ui.view.BaseView; 6 | 7 | import rx.functions.Action1; 8 | import rx.subscriptions.CompositeSubscription; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/7/4. 12 | */ 13 | public abstract class BasePresenter { 14 | 15 | protected T mBaseView; 16 | protected CompositeSubscription mCompositeSubscription; 17 | 18 | public void attachView(T view) { 19 | this.mBaseView = view; 20 | onViewAttach(); 21 | mCompositeSubscription = new CompositeSubscription(); 22 | addSubscription(RxEvent.EVENT_SWITCH_NIGHT, new Action1() { 23 | @Override 24 | public void call(RxEvent rxEvent) { 25 | mBaseView.onNightSwitch(); 26 | } 27 | }); 28 | initSubscription(); 29 | } 30 | 31 | protected void onViewAttach() { 32 | } 33 | 34 | protected void initSubscription() { 35 | } 36 | 37 | protected void addSubscription(@RxEvent.EventType int type, Action1 action) { 38 | mCompositeSubscription.add(RxBus.getInstance().toObservable(type).subscribe(action, new Action1() { 39 | @Override 40 | public void call(Throwable throwable) { 41 | throwable.printStackTrace(); 42 | } 43 | })); 44 | } 45 | 46 | public void detachView() { 47 | if (mCompositeSubscription != null) { 48 | mCompositeSubscription.unsubscribe(); 49 | } 50 | mBaseView = null; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/presenter/ComicPresenter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.presenter; 2 | 3 | import com.haleydu.cimoc.manager.TagManager; 4 | import com.haleydu.cimoc.model.Tag; 5 | import com.haleydu.cimoc.ui.view.ComicView; 6 | 7 | import java.util.List; 8 | 9 | import rx.android.schedulers.AndroidSchedulers; 10 | import rx.functions.Action1; 11 | 12 | /** 13 | * Created by Hiroshi on 2016/10/11. 14 | */ 15 | 16 | public class ComicPresenter extends BasePresenter { 17 | 18 | private TagManager mTagManager; 19 | 20 | @Override 21 | protected void onViewAttach() { 22 | mTagManager = TagManager.getInstance(mBaseView); 23 | } 24 | 25 | public void loadTag() { 26 | mCompositeSubscription.add(mTagManager.listInRx() 27 | .observeOn(AndroidSchedulers.mainThread()) 28 | .subscribe(new Action1>() { 29 | @Override 30 | public void call(List list) { 31 | mBaseView.onTagLoadSuccess(list); 32 | } 33 | }, new Action1() { 34 | @Override 35 | public void call(Throwable throwable) { 36 | mBaseView.onTagLoadFail(); 37 | } 38 | })); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/presenter/SearchPresenter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.presenter; 2 | 3 | import com.haleydu.cimoc.core.Manga; 4 | import com.haleydu.cimoc.manager.SourceManager; 5 | import com.haleydu.cimoc.model.Source; 6 | import com.haleydu.cimoc.ui.view.SearchView; 7 | 8 | import java.util.List; 9 | 10 | import rx.android.schedulers.AndroidSchedulers; 11 | import rx.functions.Action1; 12 | 13 | /** 14 | * Created by Hiroshi on 2016/10/11. 15 | */ 16 | 17 | public class SearchPresenter extends BasePresenter { 18 | 19 | private SourceManager mSourceManager; 20 | 21 | @Override 22 | protected void onViewAttach() { 23 | mSourceManager = SourceManager.getInstance(mBaseView); 24 | } 25 | 26 | public void loadSource() { 27 | mCompositeSubscription.add(mSourceManager.listEnableInRx() 28 | .observeOn(AndroidSchedulers.mainThread()) 29 | .subscribe(new Action1>() { 30 | @Override 31 | public void call(List list) { 32 | mBaseView.onSourceLoadSuccess(list); 33 | } 34 | }, new Action1() { 35 | @Override 36 | public void call(Throwable throwable) { 37 | mBaseView.onSourceLoadFail(); 38 | } 39 | })); 40 | } 41 | 42 | public void loadAutoComplete(String keyword) { 43 | mCompositeSubscription.add(Manga.loadAutoComplete(keyword) 44 | .observeOn(AndroidSchedulers.mainThread()) 45 | .subscribe(new Action1>() { 46 | @Override 47 | public void call(List list) { 48 | mBaseView.onAutoCompleteLoadSuccess(list); 49 | } 50 | }, new Action1() { 51 | @Override 52 | public void call(Throwable throwable) { 53 | throwable.printStackTrace(); 54 | } 55 | })); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/presenter/SourceDetailPresenter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.presenter; 2 | 3 | import com.haleydu.cimoc.manager.ComicManager; 4 | import com.haleydu.cimoc.manager.SourceManager; 5 | import com.haleydu.cimoc.model.Source; 6 | import com.haleydu.cimoc.ui.view.SourceDetailView; 7 | 8 | /** 9 | * Created by Hiroshi on 2017/1/18. 10 | */ 11 | 12 | public class SourceDetailPresenter extends BasePresenter { 13 | 14 | private SourceManager mSourceManager; 15 | private ComicManager mComicManager; 16 | 17 | @Override 18 | protected void onViewAttach() { 19 | mSourceManager = SourceManager.getInstance(mBaseView); 20 | mComicManager = ComicManager.getInstance(mBaseView); 21 | } 22 | 23 | public void load(int type) { 24 | Source source = mSourceManager.load(type); 25 | long count = mComicManager.countBySource(type); 26 | mBaseView.onSourceLoadSuccess(type, source.getTitle(), count); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/presenter/SourcePresenter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.presenter; 2 | 3 | import com.haleydu.cimoc.manager.SourceManager; 4 | import com.haleydu.cimoc.model.Source; 5 | import com.haleydu.cimoc.ui.view.SourceView; 6 | 7 | import java.util.List; 8 | 9 | import rx.android.schedulers.AndroidSchedulers; 10 | import rx.functions.Action1; 11 | 12 | /** 13 | * Created by Hiroshi on 2016/8/11. 14 | */ 15 | public class SourcePresenter extends BasePresenter { 16 | 17 | private SourceManager mSourceManager; 18 | 19 | @Override 20 | protected void onViewAttach() { 21 | mSourceManager = SourceManager.getInstance(mBaseView); 22 | } 23 | 24 | public void load() { 25 | mCompositeSubscription.add(mSourceManager.list() 26 | .observeOn(AndroidSchedulers.mainThread()) 27 | .subscribe(new Action1>() { 28 | @Override 29 | public void call(List list) { 30 | mBaseView.onSourceLoadSuccess(list); 31 | } 32 | }, new Action1() { 33 | @Override 34 | public void call(Throwable throwable) { 35 | mBaseView.onSourceLoadFail(); 36 | } 37 | })); 38 | } 39 | 40 | public void update(Source source) { 41 | mSourceManager.update(source); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/rx/RxBus.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.rx; 2 | 3 | import rx.Observable; 4 | import rx.android.schedulers.AndroidSchedulers; 5 | import rx.functions.Func1; 6 | import rx.subjects.PublishSubject; 7 | import rx.subjects.SerializedSubject; 8 | import rx.subjects.Subject; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/8/21. 12 | */ 13 | public class RxBus { 14 | 15 | private static RxBus instance; 16 | 17 | private Subject bus; 18 | 19 | private RxBus() { 20 | bus = new SerializedSubject<>(PublishSubject.create()); 21 | } 22 | 23 | public static RxBus getInstance() { 24 | if (instance == null) { 25 | synchronized (RxBus.class) { 26 | if (instance == null) { 27 | instance = new RxBus(); 28 | } 29 | } 30 | } 31 | return instance; 32 | } 33 | 34 | public void post(RxEvent event) { 35 | bus.onNext(event); 36 | } 37 | 38 | public Observable toObservable(@RxEvent.EventType final int type) { 39 | return bus.ofType(RxEvent.class) 40 | .filter(new Func1() { 41 | @Override 42 | public Boolean call(RxEvent rxEvent) { 43 | return rxEvent.getType() == type; 44 | } 45 | }).onBackpressureBuffer().observeOn(AndroidSchedulers.mainThread()); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/rx/ToAnotherList.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.rx; 2 | 3 | import java.util.List; 4 | 5 | import rx.Observable; 6 | import rx.functions.Func1; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/23. 10 | */ 11 | 12 | public class ToAnotherList implements Observable.Transformer, List> { 13 | 14 | private Func1 func; 15 | 16 | public ToAnotherList(Func1 func) { 17 | this.func = func; 18 | } 19 | 20 | @Override 21 | public Observable> call(Observable> observable) { 22 | return observable.flatMap(new Func1, Observable>() { 23 | @Override 24 | public Observable call(List list) { 25 | return Observable.from(list); 26 | } 27 | }).map(func).toList(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/soup/MDocument.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.soup; 2 | 3 | 4 | import org.jsoup.Jsoup; 5 | import org.jsoup.nodes.Document; 6 | import org.jsoup.select.Elements; 7 | 8 | /** 9 | * Created by reborn on 18-1-21. 10 | */ 11 | 12 | public class MDocument { 13 | 14 | private Document document; 15 | 16 | public MDocument(String html) { 17 | this.document = Jsoup.parse(html); 18 | } 19 | 20 | public String text(String cssQuery) { 21 | try { 22 | // Elements elements = document.getElementsByTag("script").eq(7); 23 | Elements elements = document.select(cssQuery); 24 | return String.valueOf(elements.first()); 25 | } catch (Exception e) { 26 | return null; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/activity/BackActivity.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.activity; 2 | 3 | import android.graphics.PorterDuff; 4 | import androidx.annotation.Nullable; 5 | import androidx.core.content.ContextCompat; 6 | import android.view.View; 7 | import android.widget.ProgressBar; 8 | 9 | import com.haleydu.cimoc.R; 10 | import com.haleydu.cimoc.utils.ThemeUtils; 11 | 12 | import butterknife.BindView; 13 | 14 | /** 15 | * Created by Hiroshi on 2016/9/11. 16 | */ 17 | public abstract class BackActivity extends BaseActivity { 18 | 19 | @Nullable 20 | @BindView(R.id.custom_progress_bar) 21 | ProgressBar mProgressBar; 22 | 23 | @Override 24 | protected void initToolbar() { 25 | super.initToolbar(); 26 | if (mToolbar != null) { 27 | mToolbar.setNavigationOnClickListener(new View.OnClickListener() { 28 | @Override 29 | public void onClick(View v) { 30 | onBackPressed(); 31 | } 32 | }); 33 | } 34 | } 35 | 36 | @Override 37 | protected void initView() { 38 | if (mProgressBar != null) { 39 | int resId = ThemeUtils.getResourceId(this, R.attr.colorAccent); 40 | mProgressBar.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(this, resId), PorterDuff.Mode.SRC_ATOP); 41 | } 42 | } 43 | 44 | protected boolean isProgressBarShown() { 45 | return mProgressBar != null && mProgressBar.isShown(); 46 | } 47 | 48 | protected void hideProgressBar() { 49 | if (mProgressBar != null) { 50 | mProgressBar.setVisibility(View.GONE); 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/activity/SourceDetailActivity.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.activity; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | 6 | import com.haleydu.cimoc.R; 7 | import com.haleydu.cimoc.global.Extra; 8 | import com.haleydu.cimoc.presenter.BasePresenter; 9 | import com.haleydu.cimoc.presenter.SourceDetailPresenter; 10 | import com.haleydu.cimoc.ui.view.SourceDetailView; 11 | import com.haleydu.cimoc.ui.widget.Option; 12 | 13 | import butterknife.BindView; 14 | import butterknife.OnClick; 15 | 16 | /** 17 | * Created by Hiroshi on 2017/1/18. 18 | */ 19 | 20 | public class SourceDetailActivity extends BackActivity implements SourceDetailView { 21 | 22 | @BindView(R.id.source_detail_type) 23 | Option mSourceType; 24 | @BindView(R.id.source_detail_title) 25 | Option mSourceTitle; 26 | @BindView(R.id.source_detail_favorite) 27 | Option mSourceFavorite; 28 | private SourceDetailPresenter mPresenter; 29 | 30 | public static Intent createIntent(Context context, int type) { 31 | Intent intent = new Intent(context, SourceDetailActivity.class); 32 | intent.putExtra(Extra.EXTRA_SOURCE, type); 33 | return intent; 34 | } 35 | 36 | @Override 37 | protected BasePresenter initPresenter() { 38 | mPresenter = new SourceDetailPresenter(); 39 | mPresenter.attachView(this); 40 | return mPresenter; 41 | } 42 | 43 | @Override 44 | protected void initData() { 45 | mPresenter.load(getIntent().getIntExtra(Extra.EXTRA_SOURCE, -1)); 46 | } 47 | 48 | @OnClick(R.id.source_detail_favorite) 49 | void onSourceFavoriteClick() { 50 | // TODO 显示这个图源的漫画 51 | } 52 | 53 | @Override 54 | public void onSourceLoadSuccess(int type, String title, long count) { 55 | mSourceType.setSummary(String.valueOf(type)); 56 | mSourceTitle.setSummary(title); 57 | mSourceFavorite.setSummary(String.valueOf(count)); 58 | } 59 | 60 | @Override 61 | protected int getLayoutRes() { 62 | return R.layout.activity_source_detail; 63 | } 64 | 65 | @Override 66 | protected String getDefaultTitle() { 67 | return getString(R.string.source_detail); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/adapter/AutoCompleteAdapter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.adapter; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.NonNull; 5 | import android.widget.ArrayAdapter; 6 | import android.widget.Filter; 7 | 8 | import com.haleydu.cimoc.R; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by Hiroshi on 2016/12/14. 15 | */ 16 | 17 | public class AutoCompleteAdapter extends ArrayAdapter { 18 | 19 | private CustomFilter mFilter; 20 | 21 | public AutoCompleteAdapter(Context context) { 22 | super(context, R.layout.item_spinner); 23 | mFilter = new CustomFilter(); 24 | } 25 | 26 | @NonNull 27 | @Override 28 | public Filter getFilter() { 29 | return mFilter; 30 | } 31 | 32 | private class CustomFilter extends Filter { 33 | 34 | @Override 35 | protected FilterResults performFiltering(CharSequence constraint) { 36 | FilterResults result = new FilterResults(); 37 | List values = new ArrayList<>(); 38 | for (int i = 0; i != getCount(); ++i) { 39 | values.add(getItem(i)); 40 | } 41 | result.values = values; 42 | result.count = values.size(); 43 | return result; 44 | } 45 | 46 | @Override 47 | protected void publishResults(CharSequence constraint, FilterResults results) { 48 | if (results.count > 0) { 49 | notifyDataSetChanged(); 50 | } else { 51 | notifyDataSetInvalidated(); 52 | } 53 | } 54 | 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/adapter/CategoryAdapter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.adapter; 2 | 3 | import android.content.Context; 4 | import android.util.Pair; 5 | import android.widget.ArrayAdapter; 6 | 7 | import com.haleydu.cimoc.R; 8 | import com.haleydu.cimoc.utils.CollectionUtils; 9 | 10 | import java.util.List; 11 | 12 | import rx.functions.Func1; 13 | 14 | /** 15 | * Created by Hiroshi on 2018/2/13. 16 | */ 17 | 18 | public class CategoryAdapter extends ArrayAdapter { 19 | 20 | private List> mCategoryList; 21 | 22 | public CategoryAdapter(Context context, List> list) { 23 | super(context, R.layout.item_spinner, CollectionUtils.map(list, new Func1, String>() { 24 | @Override 25 | public String call(Pair pair) { 26 | return pair.first; 27 | } 28 | })); 29 | mCategoryList = list; 30 | } 31 | 32 | public String getValue(int position) { 33 | return mCategoryList.get(position).second; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/adapter/DirAdapter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.adapter; 2 | 3 | import android.content.Context; 4 | import androidx.recyclerview.widget.RecyclerView; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.TextView; 8 | 9 | import com.haleydu.cimoc.R; 10 | 11 | import java.util.List; 12 | 13 | import butterknife.BindView; 14 | 15 | /** 16 | * Created by Hiroshi on 2016/12/6. 17 | */ 18 | 19 | public class DirAdapter extends BaseAdapter { 20 | 21 | public DirAdapter(Context context, List list) { 22 | super(context, list); 23 | } 24 | 25 | @Override 26 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 27 | View view = mInflater.inflate(R.layout.item_dir, parent, false); 28 | return new DirHolder(view); 29 | } 30 | 31 | @Override 32 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 33 | super.onBindViewHolder(holder, position); 34 | DirHolder viewHolder = (DirHolder) holder; 35 | viewHolder.mDirTitle.setText(mDataSet.get(position)); 36 | } 37 | 38 | @Override 39 | public RecyclerView.ItemDecoration getItemDecoration() { 40 | return null; 41 | } 42 | 43 | static class DirHolder extends BaseAdapter.BaseViewHolder { 44 | @BindView(R.id.item_dir_title) 45 | TextView mDirTitle; 46 | 47 | DirHolder(View view) { 48 | super(view); 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/adapter/TabPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.adapter; 2 | 3 | import androidx.fragment.app.Fragment; 4 | import androidx.fragment.app.FragmentManager; 5 | import androidx.fragment.app.FragmentPagerAdapter; 6 | 7 | import com.haleydu.cimoc.ui.fragment.BaseFragment; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/10/11. 11 | */ 12 | 13 | public class TabPagerAdapter extends FragmentPagerAdapter { 14 | 15 | private BaseFragment[] fragment; 16 | private String[] title; 17 | 18 | public TabPagerAdapter(FragmentManager manager, BaseFragment[] fragment, String[] title) { 19 | super(manager); 20 | this.fragment = fragment; 21 | this.title = title; 22 | } 23 | 24 | @Override 25 | public Fragment getItem(int position) { 26 | return fragment[position]; 27 | } 28 | 29 | @Override 30 | public int getCount() { 31 | return fragment.length; 32 | } 33 | 34 | @Override 35 | public CharSequence getPageTitle(int position) { 36 | return title[position]; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/adapter/TagAdapter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.adapter; 2 | 3 | import android.content.Context; 4 | import android.graphics.Rect; 5 | import androidx.annotation.ColorInt; 6 | import androidx.recyclerview.widget.RecyclerView; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.TextView; 10 | 11 | import com.haleydu.cimoc.R; 12 | import com.haleydu.cimoc.model.Tag; 13 | 14 | import java.util.List; 15 | 16 | import butterknife.BindView; 17 | 18 | /** 19 | * Created by Hiroshi on 2016/10/11. 20 | */ 21 | 22 | public class TagAdapter extends BaseAdapter { 23 | 24 | private @ColorInt 25 | int color = -1; 26 | 27 | public TagAdapter(Context context, List list) { 28 | super(context, list); 29 | } 30 | 31 | @Override 32 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 33 | View view = mInflater.inflate(R.layout.item_tag, parent, false); 34 | return new TagHolder(view); 35 | } 36 | 37 | @Override 38 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 39 | super.onBindViewHolder(holder, position); 40 | Tag tag = mDataSet.get(position); 41 | TagHolder viewHolder = (TagHolder) holder; 42 | viewHolder.tagTitle.setText(tag.getTitle()); 43 | if (color != -1) { 44 | viewHolder.tagTitle.setBackgroundColor(color); 45 | } 46 | } 47 | 48 | @Override 49 | public RecyclerView.ItemDecoration getItemDecoration() { 50 | return new RecyclerView.ItemDecoration() { 51 | @Override 52 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { 53 | int offset = parent.getWidth() / 90; 54 | outRect.set(offset, 0, offset, (int) (offset * 1.5)); 55 | } 56 | }; 57 | } 58 | 59 | public void setColor(@ColorInt int color) { 60 | this.color = color; 61 | } 62 | 63 | static class TagHolder extends BaseViewHolder { 64 | @BindView(R.id.item_tag_title) 65 | TextView tagTitle; 66 | 67 | TagHolder(final View view) { 68 | super(view); 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/adapter/TagEditorAdapter.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.adapter; 2 | 3 | import android.content.Context; 4 | import androidx.recyclerview.widget.RecyclerView; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.CheckBox; 8 | import android.widget.TextView; 9 | 10 | import com.haleydu.cimoc.R; 11 | import com.haleydu.cimoc.misc.Switcher; 12 | import com.haleydu.cimoc.model.Tag; 13 | 14 | import java.util.List; 15 | 16 | import butterknife.BindView; 17 | 18 | /** 19 | * Created by Hiroshi on 2016/12/2. 20 | */ 21 | 22 | public class TagEditorAdapter extends BaseAdapter> { 23 | 24 | public TagEditorAdapter(Context context, List> list) { 25 | super(context, list); 26 | } 27 | 28 | @Override 29 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 30 | View view = mInflater.inflate(R.layout.item_select, parent, false); 31 | return new TagHolder(view); 32 | } 33 | 34 | @Override 35 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 36 | super.onBindViewHolder(holder, position); 37 | TagHolder viewHolder = (TagHolder) holder; 38 | Switcher switcher = mDataSet.get(position); 39 | viewHolder.tagTitle.setText(switcher.getElement().getTitle()); 40 | viewHolder.tagChoice.setChecked(switcher.isEnable()); 41 | } 42 | 43 | @Override 44 | public RecyclerView.ItemDecoration getItemDecoration() { 45 | return null; 46 | } 47 | 48 | @Override 49 | protected boolean isClickValid() { 50 | return true; 51 | } 52 | 53 | static class TagHolder extends BaseAdapter.BaseViewHolder { 54 | @BindView(R.id.item_select_title) 55 | TextView tagTitle; 56 | @BindView(R.id.item_select_checkbox) 57 | CheckBox tagChoice; 58 | 59 | TagHolder(View view) { 60 | super(view); 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/fragment/dialog/ItemDialogFragment.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.fragment.dialog; 2 | 3 | import android.app.Dialog; 4 | import android.content.DialogInterface; 5 | import android.os.Bundle; 6 | import androidx.appcompat.app.AlertDialog; 7 | import androidx.fragment.app.DialogFragment; 8 | 9 | import com.haleydu.cimoc.component.DialogCaller; 10 | 11 | /** 12 | * Created by Hiroshi on 2016/12/2. 13 | */ 14 | 15 | public class ItemDialogFragment extends DialogFragment implements DialogInterface.OnClickListener { 16 | 17 | public static ItemDialogFragment newInstance(int title, String[] item, int requestCode) { 18 | ItemDialogFragment fragment = new ItemDialogFragment(); 19 | Bundle bundle = new Bundle(); 20 | bundle.putInt(DialogCaller.EXTRA_DIALOG_TITLE, title); 21 | bundle.putStringArray(DialogCaller.EXTRA_DIALOG_ITEMS, item); 22 | bundle.putInt(DialogCaller.EXTRA_DIALOG_REQUEST_CODE, requestCode); 23 | fragment.setArguments(bundle); 24 | return fragment; 25 | } 26 | 27 | @Override 28 | public Dialog onCreateDialog(Bundle savedInstanceState) { 29 | AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); 30 | String[] item = getArguments().getStringArray(DialogCaller.EXTRA_DIALOG_ITEMS); 31 | builder.setTitle(getArguments().getInt(DialogCaller.EXTRA_DIALOG_TITLE)) 32 | .setItems(item, this); 33 | return builder.create(); 34 | } 35 | 36 | @Override 37 | public void onClick(DialogInterface dialogInterface, int which) { 38 | int requestCode = getArguments().getInt(DialogCaller.EXTRA_DIALOG_REQUEST_CODE); 39 | Bundle bundle = new Bundle(); 40 | bundle.putInt(DialogCaller.EXTRA_DIALOG_RESULT_INDEX, which); 41 | DialogCaller target = (DialogCaller) (getTargetFragment() != null ? getTargetFragment() : getActivity()); 42 | target.onDialogResult(requestCode, bundle); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/fragment/recyclerview/RecyclerViewFragment.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.fragment.recyclerview; 2 | 3 | import androidx.recyclerview.widget.RecyclerView; 4 | import android.view.View; 5 | 6 | import com.haleydu.cimoc.R; 7 | import com.haleydu.cimoc.ui.adapter.BaseAdapter; 8 | import com.haleydu.cimoc.ui.fragment.BaseFragment; 9 | 10 | import butterknife.BindView; 11 | 12 | /** 13 | * Created by Hiroshi on 2016/10/11. 14 | */ 15 | 16 | public abstract class RecyclerViewFragment extends BaseFragment implements BaseAdapter.OnItemClickListener, 17 | BaseAdapter.OnItemLongClickListener { 18 | 19 | @BindView(R.id.recycler_view_content) 20 | protected RecyclerView mRecyclerView; 21 | 22 | @Override 23 | protected void initView() { 24 | mRecyclerView.setHasFixedSize(true); 25 | mRecyclerView.setItemAnimator(null); 26 | mRecyclerView.setLayoutManager(initLayoutManager()); 27 | BaseAdapter adapter = initAdapter(); 28 | if (adapter != null) { 29 | adapter.setOnItemClickListener(this); 30 | adapter.setOnItemLongClickListener(this); 31 | mRecyclerView.addItemDecoration(adapter.getItemDecoration()); 32 | mRecyclerView.setAdapter(adapter); 33 | } 34 | } 35 | 36 | abstract protected BaseAdapter initAdapter(); 37 | 38 | protected abstract RecyclerView.LayoutManager initLayoutManager(); 39 | 40 | @Override 41 | public void onItemClick(View view, int position) { 42 | } 43 | 44 | @Override 45 | public boolean onItemLongClick(View view, int position) { 46 | return false; 47 | } 48 | 49 | @Override 50 | protected int getLayoutRes() { 51 | return R.layout.fragment_recycler_view; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/AboutView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | /** 4 | * Created by Hiroshi on 2016/8/24. 5 | */ 6 | public interface AboutView extends BaseView { 7 | 8 | void onUpdateReady(); 9 | 10 | void onUpdateNone(); 11 | 12 | void onCheckError(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/BackupView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/10/19. 7 | */ 8 | 9 | public interface BackupView extends BaseView, DialogCaller { 10 | 11 | void onBackupSaveSuccess(int size); 12 | 13 | void onBackupSaveFail(); 14 | 15 | void onBackupRestoreSuccess(); 16 | 17 | void onBackupRestoreFail(); 18 | 19 | void onComicFileLoadSuccess(String[] file); 20 | 21 | void onTagFileLoadSuccess(String[] file); 22 | 23 | void onSettingsFileLoadSuccess(String[] file); 24 | 25 | void onClearFileLoadSuccess(String[] file); 26 | 27 | void onFileLoadFail(); 28 | 29 | void onClearBackupSuccess(); 30 | 31 | void onClearBackupFail(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/BaseView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.AppGetter; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/8/21. 7 | */ 8 | public interface BaseView extends AppGetter { 9 | 10 | void onNightSwitch(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/ComicView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.component.ThemeResponsive; 5 | import com.haleydu.cimoc.model.Tag; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/10/11. 11 | */ 12 | 13 | public interface ComicView extends BaseView, ThemeResponsive, DialogCaller { 14 | 15 | void onTagLoadSuccess(List list); 16 | 17 | void onTagLoadFail(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/DetailView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.model.Chapter; 4 | import com.haleydu.cimoc.model.Comic; 5 | import com.haleydu.cimoc.model.Task; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/8/21. 12 | */ 13 | public interface DetailView extends BaseView { 14 | 15 | void onComicLoadSuccess(Comic comic); 16 | 17 | void onChapterLoadSuccess(List list); 18 | 19 | void onLastChange(String chapter); 20 | 21 | void onParseError(); 22 | 23 | void onTaskAddSuccess(ArrayList list); 24 | 25 | void onTaskAddFail(); 26 | 27 | void onPreLoadSuccess(List list,Comic comic); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/DownloadView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.model.MiniComic; 4 | import com.haleydu.cimoc.model.Task; 5 | 6 | import java.util.ArrayList; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/9/1. 10 | */ 11 | public interface DownloadView extends GridView { 12 | 13 | void onDownloadAdd(MiniComic comic); 14 | 15 | void onDownloadDelete(long id); 16 | 17 | void onDownloadDeleteSuccess(long id); 18 | 19 | void onDownloadStart(); 20 | 21 | void onDownloadStop(); 22 | 23 | void onTaskLoadSuccess(ArrayList list); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/FavoriteView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.model.MiniComic; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by Hiroshi on 2016/8/21. 9 | */ 10 | public interface FavoriteView extends GridView { 11 | 12 | void OnComicFavorite(MiniComic comic); 13 | 14 | void OnComicRestore(List list); 15 | 16 | void OnComicUnFavorite(long id); 17 | 18 | void onComicCheckSuccess(MiniComic comic, int progress, int max); 19 | 20 | void onComicCheckFail(); 21 | 22 | void onComicCheckComplete(); 23 | 24 | void onComicRead(MiniComic comic); 25 | 26 | void onHighlightCancel(MiniComic comic); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/GridView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.component.ThemeResponsive; 5 | import com.haleydu.cimoc.model.MiniComic; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/9/30. 11 | */ 12 | 13 | public interface GridView extends BaseView, DialogCaller, ThemeResponsive { 14 | 15 | void onComicLoadSuccess(List list); 16 | 17 | void onComicLoadFail(); 18 | 19 | void onExecuteFail(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/HistoryView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.model.MiniComic; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by Hiroshi on 2016/8/21. 9 | */ 10 | public interface HistoryView extends GridView { 11 | 12 | void onHistoryDelete(long id); 13 | 14 | void onItemUpdate(MiniComic comic); 15 | 16 | void OnComicRestore(List list); 17 | 18 | void onHistoryClearSuccess(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/LocalView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.model.MiniComic; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Hiroshi on 2017/5/14. 10 | */ 11 | 12 | public interface LocalView extends GridView, DialogCaller { 13 | 14 | void onLocalDeleteSuccess(long id); 15 | 16 | void onLocalScanSuccess(List list); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/MainView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/9/21. 7 | */ 8 | 9 | public interface MainView extends BaseView, DialogCaller { 10 | 11 | void onLastLoadSuccess(long id, int source, String cid, String title, String cover); 12 | 13 | void onLastLoadFail(); 14 | 15 | void onLastChange(long id, int source, String cid, String title, String cover); 16 | 17 | void onUpdateReady(); 18 | 19 | void onUpdateReady(String versionName, String content, String mUrl, int versionCode, String md5); 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/PartFavoriteView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.model.MiniComic; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/11. 10 | */ 11 | 12 | public interface PartFavoriteView extends BaseView, DialogCaller { 13 | 14 | void onComicLoadSuccess(List list); 15 | 16 | void onComicLoadFail(); 17 | 18 | void onComicTitleLoadSuccess(List list); 19 | 20 | void onComicTitleLoadFail(); 21 | 22 | void onComicInsertSuccess(List list); 23 | 24 | void onComicInsertFail(); 25 | 26 | void onComicAdd(MiniComic comic); 27 | 28 | void onComicRead(MiniComic comic); 29 | 30 | void onComicRemove(long id); 31 | 32 | void onHighlightCancel(MiniComic comic); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/ReaderView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import android.net.Uri; 4 | 5 | import com.haleydu.cimoc.model.Chapter; 6 | import com.haleydu.cimoc.model.ImageUrl; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/8/21. 12 | */ 13 | public interface ReaderView extends BaseView { 14 | 15 | void onParseError(); 16 | 17 | void onNextLoadNone(); 18 | 19 | void onPrevLoadNone(); 20 | 21 | void onNextLoading(); 22 | 23 | void onPrevLoading(); 24 | 25 | void onNextLoadSuccess(List list); 26 | 27 | void onPrevLoadSuccess(List list); 28 | 29 | void onInitLoadSuccess(List list, int progress, int source, boolean local); 30 | 31 | void onChapterChange(Chapter chapter); 32 | 33 | void onImageLoadSuccess(Long id, String url); 34 | 35 | void onImageLoadFail(Long id); 36 | 37 | void onPictureSaveSuccess(Uri uri); 38 | 39 | void onPictureSaveFail(); 40 | 41 | void onPicturePaging(ImageUrl image); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/ResultView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.model.Comic; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by Hiroshi on 2016/8/21. 9 | */ 10 | public interface ResultView extends BaseView { 11 | 12 | void onSearchError(); 13 | 14 | void onSearchSuccess(Comic comic); 15 | 16 | void onLoadSuccess(List list); 17 | 18 | void onLoadFail(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/SearchView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.model.Source; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/11. 10 | */ 11 | 12 | public interface SearchView extends BaseView, DialogCaller { 13 | 14 | void onSourceLoadSuccess(List list); 15 | 16 | void onSourceLoadFail(); 17 | 18 | void onAutoCompleteLoadSuccess(List list); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/SettingsView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | 5 | /** 6 | * Created by Hiroshi on 2016/8/21. 7 | */ 8 | public interface SettingsView extends BaseView, DialogCaller { 9 | 10 | void onFileMoveSuccess(); 11 | 12 | void onExecuteSuccess(); 13 | 14 | void onExecuteFail(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/SourceDetailView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | /** 4 | * Created by Hiroshi on 2017/1/18. 5 | */ 6 | 7 | public interface SourceDetailView extends BaseView { 8 | 9 | void onSourceLoadSuccess(int type, String title, long count); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/SourceView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.ThemeResponsive; 4 | import com.haleydu.cimoc.model.Source; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/8/21. 10 | */ 11 | public interface SourceView extends BaseView, ThemeResponsive { 12 | 13 | void onSourceLoadSuccess(List list); 14 | 15 | void onSourceLoadFail(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/TagEditorView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.misc.Switcher; 4 | import com.haleydu.cimoc.model.Tag; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/12/2. 10 | */ 11 | 12 | public interface TagEditorView extends BaseView { 13 | 14 | void onTagLoadSuccess(List> list); 15 | 16 | void onTagLoadFail(); 17 | 18 | void onTagUpdateSuccess(); 19 | 20 | void onTagUpdateFail(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/TagView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.component.ThemeResponsive; 5 | import com.haleydu.cimoc.model.Tag; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/10/10. 11 | */ 12 | 13 | public interface TagView extends BaseView, ThemeResponsive, DialogCaller { 14 | 15 | void onTagLoadSuccess(List list); 16 | 17 | void onTagLoadFail(); 18 | 19 | void onTagDeleteSuccess(Tag tag); 20 | 21 | void onTagDeleteFail(); 22 | 23 | void onTagRestore(List list); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/view/TaskView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.view; 2 | 3 | import com.haleydu.cimoc.component.DialogCaller; 4 | import com.haleydu.cimoc.model.Task; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/9/7. 10 | */ 11 | public interface TaskView extends BaseView, DialogCaller { 12 | 13 | void onTaskLoadSuccess(List list, boolean local); 14 | 15 | void onTaskLoadFail(); 16 | 17 | void onLastChange(String path); 18 | 19 | void onTaskAdd(List list); 20 | 21 | void onTaskParse(long id); 22 | 23 | void onTaskProcess(long id, int progress, int max); 24 | 25 | void onTaskPause(long id); 26 | 27 | void onTaskError(long id); 28 | 29 | void onTaskDeleteSuccess(List list); 30 | 31 | void onTaskDeleteFail(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/AnimatedScaleRunnable.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.graphics.Matrix; 4 | import android.view.View; 5 | import android.view.animation.AccelerateDecelerateInterpolator; 6 | import android.view.animation.Interpolator; 7 | 8 | /** 9 | * Created by Hiroshi on 2017/5/27. 10 | */ 11 | 12 | class AnimatedScaleRunnable implements Runnable { 13 | 14 | private final View mView; 15 | private final Matrix mMatrix; 16 | private final float mFocusX, mFocusY; 17 | private final long mStartTime; 18 | private final float mScaleStart, mScaleEnd; 19 | private final OnScaleDragGestureListener mListener; 20 | private final Interpolator mZoomInterpolator = new AccelerateDecelerateInterpolator(); 21 | 22 | AnimatedScaleRunnable(float scale, float x, float y, View view, Matrix matrix, 23 | OnScaleDragGestureListener listener) { 24 | mFocusX = x; 25 | mFocusY = y; 26 | mStartTime = System.currentTimeMillis(); 27 | mScaleStart = ViewUtils.calculateScale(matrix); 28 | mScaleEnd = scale; 29 | mView = view; 30 | mMatrix = matrix; 31 | mListener = listener; 32 | } 33 | 34 | @Override 35 | public void run() { 36 | float t = interpolate(); 37 | float scale = mScaleStart + t * (mScaleEnd - mScaleStart); 38 | float deltaScale = scale / ViewUtils.calculateScale(mMatrix); 39 | 40 | mListener.onScale(deltaScale, mFocusX, mFocusY); 41 | 42 | if (t < 1f) { 43 | ViewUtils.postOnAnimation(mView, this); 44 | } 45 | } 46 | 47 | private float interpolate() { 48 | float t = 1f * (System.currentTimeMillis() - mStartTime) / 200; 49 | t = Math.min(1f, t); 50 | t = mZoomInterpolator.getInterpolation(t); 51 | return t; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/CustomToast.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.os.Handler; 5 | import android.widget.Toast; 6 | 7 | public class CustomToast { 8 | 9 | private static Toast mToast; 10 | private static Handler mHandler = new Handler(); 11 | private static Runnable r = new Runnable() { 12 | public void run() { 13 | mToast.cancel(); 14 | } 15 | }; 16 | 17 | public static void showToast(Context mContext, String text, int duration) { 18 | 19 | mHandler.removeCallbacks(r); 20 | if (mToast != null) 21 | mToast.setText(text); 22 | else 23 | mToast = Toast.makeText(mContext, text, Toast.LENGTH_SHORT); 24 | mHandler.postDelayed(r, duration); 25 | 26 | mToast.show(); 27 | } 28 | 29 | public static void showToast(Context mContext, int resId, int duration) { 30 | showToast(mContext, mContext.getResources().getString(resId), duration); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/MiniClockText.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.os.SystemClock; 5 | import androidx.appcompat.widget.AppCompatTextView; 6 | import android.text.format.DateFormat; 7 | import android.util.AttributeSet; 8 | 9 | import java.util.Calendar; 10 | 11 | /** 12 | * Created by Hiroshi on 2016/7/16. 13 | */ 14 | public class MiniClockText extends AppCompatTextView { 15 | 16 | public static final CharSequence FORMAT_24_HOUR = "HH:mm"; 17 | 18 | private Calendar mCalendar; 19 | private boolean mAttached = false; 20 | 21 | private Runnable mTicker = new Runnable() { 22 | @Override 23 | public void run() { 24 | mCalendar.setTimeInMillis(System.currentTimeMillis()); 25 | setText(DateFormat.format(FORMAT_24_HOUR, mCalendar)); 26 | 27 | long now = SystemClock.uptimeMillis(); 28 | long next = now + (1000 - now % 1000); 29 | 30 | getHandler().postAtTime(mTicker, next); 31 | } 32 | }; 33 | 34 | public MiniClockText(Context context) { 35 | this(context, null); 36 | } 37 | 38 | public MiniClockText(Context context, AttributeSet attrs) { 39 | this(context, attrs, 0); 40 | } 41 | 42 | public MiniClockText(Context context, AttributeSet attrs, int defStyle) { 43 | super(context, attrs, defStyle); 44 | initClock(); 45 | } 46 | 47 | private void initClock() { 48 | if (mCalendar == null) { 49 | mCalendar = Calendar.getInstance(); 50 | } 51 | } 52 | 53 | @Override 54 | protected void onAttachedToWindow() { 55 | super.onAttachedToWindow(); 56 | if (!mAttached) { 57 | mAttached = true; 58 | mTicker.run(); 59 | } 60 | } 61 | 62 | @Override 63 | protected void onDetachedFromWindow() { 64 | super.onDetachedFromWindow(); 65 | if (mAttached) { 66 | getHandler().removeCallbacks(mTicker); 67 | mAttached = false; 68 | } 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/OnScaleDragGestureListener.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | /** 4 | * **************************************************************************** 5 | * Copyright 2011, 2012 Chris Banes. 6 | *

7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | *

11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | *

13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ***************************************************************************** 19 | */ 20 | public interface OnScaleDragGestureListener { 21 | void onDrag(float dx, float dy); 22 | 23 | void onFling(float startX, float startY, float velocityX, float velocityY); 24 | 25 | void onScale(float scaleFactor, float focusX, float focusY); 26 | 27 | void onScaleEnd(); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/OnTapGestureListener.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | /** 4 | * Created by Hiroshi on 2017/5/27. 5 | */ 6 | 7 | public interface OnTapGestureListener { 8 | 9 | void onSingleTap(float x, float y); 10 | 11 | void onLongPress(float x, float y); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/Option.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.LayoutInflater; 7 | import android.widget.FrameLayout; 8 | import android.widget.TextView; 9 | 10 | import com.haleydu.cimoc.R; 11 | 12 | import butterknife.ButterKnife; 13 | 14 | /** 15 | * Created by Hiroshi on 2017/1/11. 16 | */ 17 | 18 | public class Option extends FrameLayout { 19 | 20 | protected TextView mTitleView; 21 | protected TextView mSummaryView; 22 | 23 | public Option(Context context) { 24 | this(context, null); 25 | } 26 | 27 | public Option(Context context, AttributeSet attrs) { 28 | this(context, attrs, 0); 29 | } 30 | 31 | public Option(Context context, AttributeSet attrs, int defStyle) { 32 | super(context, attrs, defStyle); 33 | LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 34 | layoutInflater.inflate(R.layout.custom_option, this); 35 | 36 | initText(context, attrs); 37 | } 38 | 39 | private void initText(Context context, AttributeSet attrs) { 40 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.Option); 41 | String title = typedArray.getString(R.styleable.Option_title); 42 | String summary = typedArray.getString(R.styleable.Option_summary); 43 | 44 | mTitleView = this.findViewById(R.id.custom_option_title); 45 | mSummaryView = this.findViewById(R.id.custom_option_summary); 46 | 47 | mTitleView.setText(title); 48 | mSummaryView.setText(summary); 49 | 50 | typedArray.recycle(); 51 | } 52 | 53 | public void setSummary(CharSequence text) { 54 | mSummaryView.setText(text); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/PreCacheLayoutManager.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import androidx.recyclerview.widget.LinearLayoutManager; 5 | import androidx.recyclerview.widget.RecyclerView; 6 | 7 | /** 8 | * Created by Hiroshi on 2016/8/13. 9 | */ 10 | public class PreCacheLayoutManager extends LinearLayoutManager { 11 | 12 | private int mExtraSpace = 0; 13 | 14 | public PreCacheLayoutManager(Context context) { 15 | super(context); 16 | } 17 | 18 | public PreCacheLayoutManager(Context context, int orientation, boolean reverseLayout) { 19 | super(context, orientation, reverseLayout); 20 | } 21 | 22 | public void setExtraSpace(int extraSpace) { 23 | mExtraSpace = extraSpace; 24 | } 25 | 26 | @Override 27 | protected int getExtraLayoutSpace(RecyclerView.State state) { 28 | if (mExtraSpace > 0) { 29 | if (getOrientation() == LinearLayoutManager.HORIZONTAL) { 30 | return mExtraSpace * getWidth(); 31 | } else { 32 | return mExtraSpace * getHeight(); 33 | } 34 | } 35 | return 0; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/RetryDraweeView.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import com.facebook.drawee.controller.AbstractDraweeController; 7 | import com.facebook.drawee.generic.GenericDraweeHierarchy; 8 | import com.facebook.drawee.view.SimpleDraweeView; 9 | 10 | /** 11 | * Created by Hiroshi on 2017/5/27. 12 | */ 13 | 14 | public class RetryDraweeView extends SimpleDraweeView { 15 | 16 | public RetryDraweeView(Context context, GenericDraweeHierarchy hierarchy) { 17 | super(context, hierarchy); 18 | } 19 | 20 | public RetryDraweeView(Context context) { 21 | this(context, null, 0); 22 | } 23 | 24 | public RetryDraweeView(Context context, AttributeSet attrs) { 25 | this(context, attrs, 0); 26 | } 27 | 28 | public RetryDraweeView(Context context, AttributeSet attrs, int defStyle) { 29 | super(context, attrs, defStyle); 30 | } 31 | 32 | public boolean retry() { 33 | AbstractDraweeController controller = (AbstractDraweeController) getController(); 34 | return controller != null && controller.onClick(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/ReverseSeekBar.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | import org.adw.library.widgets.discreteseekbar.DiscreteSeekBar; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/8/13. 10 | */ 11 | public class ReverseSeekBar extends DiscreteSeekBar { 12 | 13 | private boolean isReverse = false; 14 | 15 | public ReverseSeekBar(Context context, AttributeSet attrs, int defStyle) { 16 | super(context, attrs, defStyle); 17 | } 18 | 19 | public ReverseSeekBar(Context context, AttributeSet attrs) { 20 | super(context, attrs); 21 | } 22 | 23 | public ReverseSeekBar(Context context) { 24 | super(context); 25 | } 26 | 27 | @Override 28 | public boolean isRtl() { 29 | return isReverse; 30 | } 31 | 32 | public void setReverse(boolean reverse) { 33 | isReverse = reverse; 34 | invalidate(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/ScrollAwareFABBehavior.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import androidx.coordinatorlayout.widget.CoordinatorLayout; 5 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 6 | import androidx.core.view.ViewCompat; 7 | import android.util.AttributeSet; 8 | import android.view.View; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/7/2. 12 | */ 13 | public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior { 14 | 15 | public ScrollAwareFABBehavior(Context context, AttributeSet attrs) { 16 | super(); 17 | } 18 | 19 | @Override 20 | public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, 21 | FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) { 22 | return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL || 23 | super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, 24 | nestedScrollAxes); 25 | } 26 | 27 | @Override 28 | public void onNestedScroll(CoordinatorLayout coordinatorLayout, FloatingActionButton child, 29 | View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { 30 | super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, 31 | dyUnconsumed); 32 | if (dyConsumed > 0 && child.getVisibility() == View.VISIBLE) { 33 | child.hide(new FloatingActionButton.OnVisibilityChangedListener() { 34 | @Override 35 | public void onHidden(FloatingActionButton fab) { 36 | super.onHidden(fab); 37 | fab.setVisibility(View.INVISIBLE); 38 | } 39 | }); 40 | } else if (dyConsumed < 0 && child.getVisibility() == View.INVISIBLE) { 41 | child.show(); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/ui/widget/ViewUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.ui.widget; 2 | 3 | import android.content.Context; 4 | import android.graphics.Matrix; 5 | import android.os.Build; 6 | import android.view.View; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/12. 10 | */ 11 | 12 | public class ViewUtils { 13 | 14 | public static float dpToPixel(float dp, Context context) { 15 | return dp * context.getResources().getDisplayMetrics().density; 16 | } 17 | 18 | public static int getStatusBarHeight(Context context) { 19 | int result = (int) Math.ceil(25 * context.getResources().getDisplayMetrics().density); 20 | int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); 21 | if (resourceId > 0) { 22 | result = context.getResources().getDimensionPixelSize(resourceId); 23 | } 24 | return result; 25 | } 26 | 27 | public static int getNavigationBarHeight(Context context) { 28 | int result = (int) Math.ceil(48 * context.getResources().getDisplayMetrics().density); 29 | int resourceId = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android"); 30 | if (resourceId > 0) { 31 | result = context.getResources().getDimensionPixelSize(resourceId); 32 | } 33 | return result; 34 | } 35 | 36 | public static void postOnAnimation(View view, Runnable runnable) { 37 | if (Build.VERSION.SDK_INT >= 16) { 38 | view.postOnAnimation(runnable); 39 | } else { 40 | view.postDelayed(runnable, 16L); 41 | } 42 | } 43 | 44 | public static float calculateScale(Matrix matrix) { 45 | float[] values = new float[9]; 46 | matrix.getValues(values); 47 | return (float) Math.sqrt((float) Math.pow(values[Matrix.MSCALE_X], 2) + 48 | (float) Math.pow(values[Matrix.MSKEW_Y], 2)); 49 | } 50 | 51 | public static int getViewWidth(View view) { 52 | return view.getWidth() - view.getPaddingLeft() - view.getPaddingRight(); 53 | } 54 | 55 | public static int getViewHeight(View view) { 56 | return view.getHeight() - view.getPaddingTop() - view.getPaddingBottom(); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/CollectionUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collection; 5 | import java.util.List; 6 | 7 | import rx.functions.Func1; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/12/2. 11 | */ 12 | 13 | public class CollectionUtils { 14 | 15 | public static Collection minus(Collection lhs, Collection rhs) { 16 | Collection collection = new ArrayList<>(lhs); 17 | lhs.removeAll(rhs); 18 | return collection; 19 | } 20 | 21 | public static List map(Collection origin, Func1 func) { 22 | List result = new ArrayList<>(origin.size()); 23 | for (T element : origin) { 24 | result.add(func.call(element)); 25 | } 26 | return result; 27 | } 28 | 29 | public static int[] unbox(List list) { 30 | int[] result = new int[list.size()]; 31 | for (int i = 0; i != result.length; ++i) { 32 | result[i] = list.get(i); 33 | } 34 | return result; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/ComicUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import androidx.collection.LongSparseArray; 4 | 5 | import com.haleydu.cimoc.model.Comic; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Hiroshi on 2017/3/24. 11 | */ 12 | 13 | public class ComicUtils { 14 | 15 | public static LongSparseArray buildComicMap(List list) { 16 | LongSparseArray array = new LongSparseArray<>(); 17 | for (Comic comic : list) { 18 | array.put(comic.getId(), comic); 19 | } 20 | return array; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/HintUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import android.content.Context; 4 | import com.google.android.material.snackbar.Snackbar; 5 | import android.view.View; 6 | import android.widget.Toast; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/9/22. 10 | */ 11 | 12 | public class HintUtils { 13 | 14 | public static void showSnackbar(View layout, String msg) { 15 | if (layout != null && layout.isShown()) { 16 | Snackbar.make(layout, msg, Snackbar.LENGTH_SHORT).show(); 17 | } 18 | } 19 | 20 | public static void showToast(Context context, int resId) { 21 | Toast.makeText(context, resId, Toast.LENGTH_SHORT).show(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/HttpUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import okhttp3.Request; 4 | 5 | /** 6 | * Created by toesbieya on 2020/03/04 7 | * okhttp的常用方法 8 | */ 9 | public class HttpUtils { 10 | public static Request getSimpleMobileRequest(String url) { 11 | return new Request.Builder() 12 | .addHeader("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/12.0 Mobile/15A372 Safari/604.1") 13 | .url(url) 14 | .build(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/JMTTUtil.kt: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils 2 | 3 | import android.graphics.Bitmap 4 | import android.graphics.BitmapFactory 5 | import android.graphics.Canvas 6 | import android.graphics.Rect 7 | import android.util.Log 8 | import okhttp3.MediaType 9 | import okhttp3.OkHttpClient 10 | import okhttp3.Response 11 | import okhttp3.ResponseBody 12 | import java.io.ByteArrayOutputStream 13 | import java.io.InputStream 14 | import kotlin.math.floor 15 | 16 | class JMTTUtil { 17 | 18 | public fun decodeImage(img: InputStream): ByteArray { 19 | // 使用bitmap进行图片处理 20 | val input = BitmapFactory.decodeStream(img) 21 | // 漫画高度 and width 22 | val height = input.height 23 | val width = input.width 24 | // 水平分割10个小图 25 | val rows = 10 26 | // 未除尽像素 27 | val remainder = (height % rows) 28 | // 创建新的图片对象 29 | val resultBitmap = Bitmap.createBitmap(input.width, input.height, Bitmap.Config.ARGB_8888) 30 | val canvas = Canvas(resultBitmap) 31 | // 分割图片 32 | for (x in 0 until rows) { 33 | // 分割算法(详情见html源码页的方法"function scramble_image(img)") 34 | var copyH = floor(height / rows.toDouble()).toInt() 35 | var py = copyH * (x) 36 | val y = height - (copyH * (x + 1)) - remainder 37 | if (x == 0) { 38 | copyH += remainder 39 | } else { 40 | py += remainder 41 | } 42 | // 要裁剪的区域 43 | val crop = Rect(0, y, width, y + copyH) 44 | // 裁剪后应放置到新图片对象的区域 45 | val splic = Rect(0, py, width, py + copyH) 46 | 47 | canvas.drawBitmap(input, crop, splic, null) 48 | } 49 | // 创建输出流 50 | val output = ByteArrayOutputStream() 51 | resultBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output) 52 | return output.toByteArray() 53 | } 54 | } -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/PermissionUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import android.Manifest; 4 | import android.app.Activity; 5 | import android.content.pm.PackageManager; 6 | 7 | import androidx.annotation.NonNull; 8 | import androidx.core.content.ContextCompat; 9 | 10 | /** 11 | * Created by Hiroshi on 2016/10/20. 12 | */ 13 | 14 | public class PermissionUtils { 15 | 16 | public static boolean hasStoragePermission(Activity activity) { 17 | int writeResult = checkPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); 18 | return writeResult == PackageManager.PERMISSION_GRANTED; 19 | } 20 | 21 | public static boolean hasAllPermissions(Activity activity) { 22 | int readResult = checkPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE); 23 | int writeResult = checkPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); 24 | int readPhoneState = checkPermission(activity, Manifest.permission.READ_PHONE_STATE); 25 | return readResult == PackageManager.PERMISSION_GRANTED && 26 | writeResult == PackageManager.PERMISSION_GRANTED && 27 | readPhoneState == PackageManager.PERMISSION_GRANTED; 28 | } 29 | 30 | public static int checkPermission(@NonNull Activity activity, @NonNull String permission) { 31 | return ContextCompat.checkSelfPermission(activity, permission); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/RxUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import android.annotation.SuppressLint; 4 | 5 | import java.security.SecureRandom; 6 | import java.security.cert.X509Certificate; 7 | 8 | import javax.net.ssl.HostnameVerifier; 9 | import javax.net.ssl.SSLContext; 10 | import javax.net.ssl.SSLSession; 11 | import javax.net.ssl.SSLSocketFactory; 12 | import javax.net.ssl.TrustManager; 13 | import javax.net.ssl.X509TrustManager; 14 | 15 | public class RxUtils { 16 | 17 | @SuppressLint("TrulyRandom") 18 | public static SSLSocketFactory createSSLSocketFactory() { 19 | SSLSocketFactory sSLSocketFactory = null; 20 | try { 21 | SSLContext sc = SSLContext.getInstance("TLS"); 22 | sc.init(null, new TrustManager[]{new TrustAllManager()}, 23 | new SecureRandom()); 24 | sSLSocketFactory = sc.getSocketFactory(); 25 | } catch (Exception ignored) { 26 | } 27 | return sSLSocketFactory; 28 | } 29 | 30 | public static class TrustAllManager implements X509TrustManager { 31 | @SuppressLint("TrustAllX509TrustManager") 32 | @Override 33 | public void checkClientTrusted(X509Certificate[] chain, String authType) { 34 | } 35 | 36 | @SuppressLint("TrustAllX509TrustManager") 37 | @Override 38 | public void checkServerTrusted(X509Certificate[] chain, String authType) { 39 | } 40 | 41 | @Override 42 | public X509Certificate[] getAcceptedIssuers() { 43 | return new X509Certificate[0]; 44 | } 45 | } 46 | 47 | public static class TrustAllHostnameVerifier implements HostnameVerifier { 48 | @SuppressLint("BadHostnameVerifier") 49 | @Override 50 | public boolean verify(String hostname, SSLSession session) { 51 | return true; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/ServiceUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import android.app.ActivityManager; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import com.haleydu.cimoc.service.DownloadService; 8 | 9 | /** 10 | * Created by Hiroshi on 2016/12/4. 11 | */ 12 | 13 | public class ServiceUtils { 14 | 15 | public static boolean isServiceRunning(Context context, Class service) { 16 | ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); 17 | for (ActivityManager.RunningServiceInfo info : manager.getRunningServices(Integer.MAX_VALUE)) { 18 | if (info.service.getClassName().equals(service.getName())) { 19 | return true; 20 | } 21 | } 22 | return false; 23 | } 24 | 25 | public static void stopService(Context context, Class service) { 26 | context.stopService(new Intent(context, DownloadService.class)); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/ThemeUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import android.content.Context; 4 | import android.util.TypedValue; 5 | 6 | import com.haleydu.cimoc.R; 7 | 8 | /** 9 | * Created by Hiroshi on 2016/10/2. 10 | */ 11 | 12 | public class ThemeUtils { 13 | 14 | public static final int THEME_BLUE = 0; 15 | public static final int THEME_GREY = 1; 16 | public static final int THEME_TEAL = 2; 17 | public static final int THEME_PURPLE = 3; 18 | public static final int THEME_PINK = 4; 19 | public static final int THEME_BROWN = 5; 20 | 21 | public static int getResourceId(Context context, int attr) { 22 | TypedValue typedValue = new TypedValue(); 23 | context.getTheme().resolveAttribute(attr, typedValue, true); 24 | return typedValue.resourceId; 25 | } 26 | 27 | public static int getThemeById(int id) { 28 | switch (id) { 29 | default: 30 | case THEME_BLUE: 31 | return R.style.AppThemeBlue; 32 | case THEME_GREY: 33 | return R.style.AppThemeGrey; 34 | case THEME_TEAL: 35 | return R.style.AppThemeTeal; 36 | case THEME_PURPLE: 37 | return R.style.AppThemePurple; 38 | case THEME_PINK: 39 | return R.style.AppThemePink; 40 | case THEME_BROWN: 41 | return R.style.AppThemeBrown; 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/UrlEncodeUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.net.URLEncoder; 5 | import java.util.regex.Matcher; 6 | import java.util.regex.Pattern; 7 | 8 | public class UrlEncodeUtils { 9 | 10 | public static String urlEncodeChinese(String url) { 11 | try { 12 | Matcher matcher = Pattern.compile("[\\u4e00-\\u9fa5]").matcher(url); 13 | String tmp = ""; 14 | while (matcher.find()) { 15 | tmp = matcher.group(); 16 | url = url.replaceAll(tmp, URLEncoder.encode(tmp, "UTF-8")); 17 | } 18 | } catch (UnsupportedEncodingException e) { 19 | e.printStackTrace(); 20 | } 21 | return url; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/interpretationUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | import com.haleydu.cimoc.model.Comic; 4 | import com.haleydu.cimoc.source.CCMH; 5 | import com.haleydu.cimoc.source.Cartoonmad; 6 | import com.haleydu.cimoc.source.JMTT; 7 | import com.haleydu.cimoc.source.CopyMH; 8 | import com.haleydu.cimoc.source.DM5; 9 | import com.haleydu.cimoc.source.GuFeng; 10 | import com.haleydu.cimoc.source.MH50; 11 | import com.haleydu.cimoc.source.Manhuatai; 12 | import com.haleydu.cimoc.source.MiGu; 13 | import com.haleydu.cimoc.source.Tencent; 14 | 15 | public class interpretationUtils { 16 | 17 | public static boolean isReverseOrder(Comic comic){ 18 | int type = comic.getSource(); 19 | return type == MH50.TYPE || 20 | type == MiGu.TYPE || 21 | type == CCMH.TYPE || 22 | type == Cartoonmad.TYPE || 23 | //type == JMTT.TYPE || 24 | //type == Manhuatai.TYPE || 25 | //type == Tencent.TYPE || 26 | //type == GuFeng.TYPE || 27 | //type == CopyMH.TYPE || 28 | type == DM5.TYPE; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/haleydu/cimoc/utils/pictureUtils.java: -------------------------------------------------------------------------------- 1 | package com.haleydu.cimoc.utils; 2 | 3 | public class pictureUtils { 4 | 5 | public static boolean isPictureFormat(String suffix){ 6 | suffix = suffix.toLowerCase(); 7 | if (suffix.equals("bmp") || 8 | suffix.equals("jpg") || 9 | suffix.equals("png") || 10 | suffix.equals("tif") || 11 | suffix.equals("gif") || 12 | suffix.equals("pcx") || 13 | suffix.equals("tga") || 14 | suffix.equals("exif") || 15 | suffix.equals("fpx") || 16 | suffix.equals("svg") || 17 | suffix.equals("psd") || 18 | suffix.equals("cdr") || 19 | suffix.equals("pcd") || 20 | suffix.equals("dxf") || 21 | suffix.equals("ufo") || 22 | suffix.equals("eps") || 23 | suffix.equals("ai") || 24 | suffix.equals("raw") || 25 | suffix.equals("wmf") || 26 | suffix.equals("webp")){ 27 | return true; 28 | } 29 | return false; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_about_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_about_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_account_box_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_account_box_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_account_box_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_account_box_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_brightness_4_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_brightness_4_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_chat_bubble_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_chat_bubble_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_chat_bubble_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_chat_bubble_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_class_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_class_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_done_all_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_done_all_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_done_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_done_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_border_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_favorite_border_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_file_download_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_file_download_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_filter_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_filter_list_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_history_white_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_history_white_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_import_contacts_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_import_contacts_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launch_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_launch_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_local_cafe_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_local_cafe_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_navigate_before_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_navigate_before_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_pause_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_pause_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_replay_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_replay_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_save_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_save_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_swap_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_swap_vert_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_sync_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_sync_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_widgets_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-hdpi/ic_widgets_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_about_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_about_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_account_box_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_account_box_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_account_box_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_account_box_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_brightness_4_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_brightness_4_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_chat_bubble_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_chat_bubble_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_chat_bubble_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_chat_bubble_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_class_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_class_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_done_all_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_done_all_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_done_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_done_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_border_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_favorite_border_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_file_download_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_file_download_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_filter_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_filter_list_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_history_white_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_history_white_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_import_contacts_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_import_contacts_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launch_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_launch_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_local_cafe_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_local_cafe_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_navigate_before_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_navigate_before_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_pause_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_pause_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_replay_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_replay_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_save_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_save_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_swap_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_swap_vert_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_sync_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_sync_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_widgets_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xhdpi/ic_widgets_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_about_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_about_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_account_box_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_account_box_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_account_box_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_account_box_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_brightness_4_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_brightness_4_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_chat_bubble_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_chat_bubble_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_chat_bubble_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_chat_bubble_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_class_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_class_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_clear_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_clear_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_done_all_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_done_all_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_done_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_done_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_border_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_favorite_border_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_favorite_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_favorite_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_file_download_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_file_download_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_filter_list_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_filter_list_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_history_black_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_history_black_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_history_white_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_history_white_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_history_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_history_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_import_contacts_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_import_contacts_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launch_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_launch_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_local_cafe_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_local_cafe_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_navigate_before_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_navigate_before_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_pause_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_pause_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_save_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_save_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_settings_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_swap_vert_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_swap_vert_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_sync_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_sync_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_widgets_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable-xxhdpi/ic_widgets_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cimoc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable/cimoc.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dialog_download_top_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/drawable/ic_dialog_download_top_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/reader_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_browser_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_chapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 14 | 15 | 16 | 17 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_page_reader.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_part_favorite.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 16 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_reader_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 25 | 26 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_result.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_source_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | 14 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_stream_reader.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_back_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_drawer_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 20 | 21 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_night_mask.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_option.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_option_checkbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 25 | 26 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_progress_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_reader_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 22 | 23 | 31 | 32 | 39 | 40 | 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_seek_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_slider.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_comic.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 20 | 21 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_grid.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_dir.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_grid.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 23 | 24 | 31 | 32 | 41 | 42 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_picture.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_picture_stream.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 21 | 22 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_select_mutil.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 21 | 22 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 20 | 21 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_spinner.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/listview_adapter.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_chapter.xml: -------------------------------------------------------------------------------- 1 | 2 |

4 | 9 | 14 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_comic.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | 19 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 17 | 22 | 26 | 31 | 32 | 33 | 34 | 35 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 37 | 41 | 45 | 50 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_part_favorite.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 13 | 17 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_tag.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_task.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | 19 | 23 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_blue_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-hdpi/ic_launcher_blue_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_blue_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-mdpi/ic_launcher_blue_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_blue_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xhdpi/ic_launcher_blue_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_blue_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxhdpi/ic_launcher_blue_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_blue_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxxhdpi/ic_launcher_blue_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values-v19/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.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 | 加载上一章 39 | 加载下一章 40 | 退出阅读器 41 | 跳到第一页 42 | 跳到最后一页 43 | 切换屏幕方向 44 | 切换阅读模式 45 | 显示/隐藏进度条 46 | 重新加载图片 47 | 切换夜间模式 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #AAFAFAFA 4 | 5 | #2196F3 6 | #1976D2 7 | 8 | #455A64 9 | #607D8B 10 | 11 | #009688 12 | #00796B 13 | 14 | #9C27B0 15 | #7B1FA2 16 | 17 | #E91E63 18 | #C2185B 19 | 20 | #795548 21 | #5D4037 22 | 23 | #FF212121 24 | 25 | #00000000 26 | 27 | #FF000000 28 | #FFFFFFFF 29 | #B0000000 30 | #4F000000 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2A96EE 4 | -------------------------------------------------------------------------------- /app/src/main/res/xml/file_paths_public.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/xml/remote_config.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | first_open_msg 6 | Welcome to Cimoc! 7 | 8 | 9 | mh50_key_msg 10 | KA58ZAQ321oobbG8 11 | 12 | 13 | mh50_iv_msg 14 | A1B2C3DEF1G321o8 15 | 16 | 17 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | mavenCentral() 7 | google() 8 | maven { url 'http://developer.huawei.com/repo/' } 9 | 10 | } 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:4.2.2' 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' 16 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10" 17 | classpath 'com.google.gms:google-services:4.3.8' // Google Services plugin 18 | classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' 19 | classpath 'com.huawei.agconnect:agcp:1.2.1.301' 20 | 21 | } 22 | } 23 | 24 | allprojects { 25 | repositories { 26 | jcenter() 27 | mavenCentral() 28 | maven { url "https://maven.google.com" } 29 | google() 30 | maven { url "http://mirrors.tools.huawei.com/maven/" } 31 | maven { url 'http://developer.huawei.com/repo/' } 32 | } 33 | } 34 | 35 | task clean(type: Delete) { 36 | delete rootProject.buildDir 37 | } 38 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | ## Project-wide Gradle settings. 2 | # 3 | # For more details on how to configure your build environment visit 4 | # http://www.gradle.org/docs/current/userguide/build_environment.html 5 | # 6 | # Specifies the JVM arguments used for the daemon process. 7 | # The setting is particularly useful for tweaking memory settings. 8 | # Default value: -Xmx1024m -XX:MaxPermSize=256m 9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 10 | # 11 | # When configured, Gradle will run in incubating parallel mode. 12 | # This option should only be used with decoupled projects. More details, visit 13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 14 | # org.gradle.parallel=true 15 | #Tue Mar 27 13:00:01 CST 2018 16 | android.enableJetifier=true 17 | android.useAndroidX=true 18 | org.gradle.jvmargs=-XX:MaxHeapSize=2048m -Xmx4608M -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Mar 20 19:35:55 CST 2020 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-6.7.1-all.zip 7 | -------------------------------------------------------------------------------- /hellovr10.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/hellovr10.jks -------------------------------------------------------------------------------- /ic_launcher_foreground.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/ic_launcher_foreground.xcf -------------------------------------------------------------------------------- /screenshot/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/screenshot/01.png -------------------------------------------------------------------------------- /screenshot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haleydu/Cimoc/891eb3f7ce51a940fd144795798c03b8e2058c0f/screenshot/icon.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | long beginOfSetting = System.currentTimeMillis() 4 | def beginOfConfig 5 | def configHasBegin = false 6 | def beginOfProjectConfig = new HashMap() 7 | def beginOfProjectExcute 8 | 9 | gradle.projectsLoaded { 10 | println '初始化阶段,耗时:' + (System.currentTimeMillis() - beginOfSetting) + 'ms' 11 | } 12 | 13 | gradle.beforeProject { project -> 14 | if (!configHasBegin) { 15 | configHasBegin = true 16 | beginOfConfig = System.currentTimeMillis() 17 | } 18 | beginOfProjectConfig.put(project, System.currentTimeMillis()) 19 | } 20 | 21 | gradle.afterProject { project -> 22 | def begin = beginOfProjectConfig.get(project) 23 | println '配置阶段,' + project + '耗时:' + (System.currentTimeMillis() - begin) + 'ms' 24 | } 25 | 26 | gradle.taskGraph.whenReady { 27 | println '配置阶段,总共耗时:' + (System.currentTimeMillis() - beginOfConfig) + 'ms' 28 | beginOfProjectExcute = System.currentTimeMillis() 29 | } 30 | 31 | gradle.taskGraph.beforeTask { task -> 32 | task.doFirst { 33 | task.ext.beginOfTask = System.currentTimeMillis() 34 | } 35 | task.doLast { 36 | println '执行阶段,' + task + '耗时:' + (System.currentTimeMillis() - task.beginOfTask) + 'ms' 37 | } 38 | } 39 | 40 | gradle.buildFinished { 41 | println '执行阶段,耗时:' + (System.currentTimeMillis() - beginOfProjectExcute) + 'ms' 42 | } 43 | 44 | 45 | gradle.addBuildListener(new BuildListener() { 46 | 47 | void buildStarted(Gradle var1) { 48 | println '开始构建' 49 | } 50 | 51 | void settingsEvaluated(Settings var1) { 52 | // var1.gradle.rootProject 这里访问 Project 对象时会报错, 53 | // 因为还未完成 Project 的初始化。 54 | println 'settings 评估完成(settings.gradle 中代码执行完毕)' 55 | } 56 | 57 | void projectsLoaded(Gradle var1) { 58 | println '项目结构加载完成(初始化阶段结束)' 59 | println '初始化结束,可访问根项目:' + var1.gradle.rootProject 60 | } 61 | 62 | void projectsEvaluated(Gradle var1) { 63 | println '所有项目评估完成(配置阶段结束)' 64 | } 65 | 66 | void buildFinished(BuildResult var1) { 67 | println '构建结束 ' 68 | } 69 | }) 70 | --------------------------------------------------------------------------------