├── .gitignore
├── LICENSE
├── README.md
├── app
├── .gitignore
├── MyBookshelf_Keys.zip
├── ReadMe.md
├── build.gradle
├── gradle.properties
├── key.properties.jks
├── proguard-rules.pro
└── src
│ ├── debug
│ └── res
│ │ └── values
│ │ └── strings.xml
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── bg
│ │ │ ├── 中国红.png
│ │ │ ├── 午后沙滩.jpg
│ │ │ ├── 宁静夜色.jpg
│ │ │ ├── 小清新.jpg
│ │ │ ├── 山水墨影.jpg
│ │ │ ├── 山水画.jpg
│ │ │ ├── 护眼漫绿.jpg
│ │ │ ├── 新羊皮纸.jpg
│ │ │ ├── 明媚倾城.jpg
│ │ │ ├── 浅黄飘带.jpg
│ │ │ ├── 深宫魅影.jpg
│ │ │ ├── 清新.jpg
│ │ │ ├── 清新时光.jpg
│ │ │ ├── 羊皮纸1.jpg
│ │ │ ├── 羊皮纸3.jpg
│ │ │ ├── 羊皮纸4.jpg
│ │ │ ├── 边彩画布.jpg
│ │ │ └── 雾花.jpg
│ │ ├── disclaimer.md
│ │ ├── number.ttf
│ │ ├── txtChapterRule.json
│ │ ├── updateLog.md
│ │ └── web
│ │ │ ├── bookshelf.css
│ │ │ ├── bookshelf.html
│ │ │ ├── bookshelf.js
│ │ │ ├── index.css
│ │ │ ├── index.html
│ │ │ └── index.js
│ ├── ic_launcher-web.png
│ ├── java
│ │ └── com
│ │ │ └── kunfei
│ │ │ └── bookshelf
│ │ │ ├── DbHelper.java
│ │ │ ├── MApplication.java
│ │ │ ├── base
│ │ │ ├── BaseModelImpl.java
│ │ │ ├── BaseTabActivity.java
│ │ │ ├── MBaseActivity.java
│ │ │ ├── MBaseFragment.java
│ │ │ ├── adapter
│ │ │ │ ├── CommonRecyclerAdapter.kt
│ │ │ │ ├── InfiniteScrollListener.kt
│ │ │ │ ├── ItemAnimation.kt
│ │ │ │ ├── ItemViewDelegate.kt
│ │ │ │ ├── ItemViewHolder.kt
│ │ │ │ ├── SimpleRecyclerAdapter.kt
│ │ │ │ └── animations
│ │ │ │ │ ├── AlphaInAnimation.kt
│ │ │ │ │ ├── BaseAnimation.kt
│ │ │ │ │ ├── ScaleInAnimation.kt
│ │ │ │ │ ├── SlideInBottomAnimation.kt
│ │ │ │ │ ├── SlideInLeftAnimation.kt
│ │ │ │ │ └── SlideInRightAnimation.kt
│ │ │ └── observer
│ │ │ │ ├── MyObserver.java
│ │ │ │ └── MySingleObserver.java
│ │ │ ├── bean
│ │ │ ├── BaseBookBean.java
│ │ │ ├── BaseChapterBean.java
│ │ │ ├── BookChapterBean.java
│ │ │ ├── BookContentBean.java
│ │ │ ├── BookInfoBean.java
│ │ │ ├── BookKindBean.java
│ │ │ ├── BookShelfBean.java
│ │ │ ├── BookSourceBean.java
│ │ │ ├── BookmarkBean.java
│ │ │ ├── CookieBean.java
│ │ │ ├── DownloadBookBean.java
│ │ │ ├── DownloadChapterBean.java
│ │ │ ├── FindKindBean.java
│ │ │ ├── FindKindGroupBean.java
│ │ │ ├── LocBookShelfBean.java
│ │ │ ├── OpenChapterBean.java
│ │ │ ├── ReplaceRuleBean.java
│ │ │ ├── SearchBookBean.java
│ │ │ ├── SearchHistoryBean.java
│ │ │ ├── TwoDataBean.java
│ │ │ ├── TxtChapterRuleBean.java
│ │ │ ├── UpdateInfoBean.java
│ │ │ └── WebChapterBean.java
│ │ │ ├── constant
│ │ │ ├── AppConstant.java
│ │ │ ├── BookType.java
│ │ │ ├── RxBusTag.java
│ │ │ └── TimeConstants.java
│ │ │ ├── help
│ │ │ ├── AppFrontBackHelper.java
│ │ │ ├── BlurTransformation.java
│ │ │ ├── BookshelfHelp.java
│ │ │ ├── ChangeSourceHelp.java
│ │ │ ├── ChapterContentHelp.java
│ │ │ ├── CrashHandler.java
│ │ │ ├── DataBackup.java
│ │ │ ├── DataRestore.java
│ │ │ ├── DocumentHelper.java
│ │ │ ├── Donate.java
│ │ │ ├── EncodeConverter.java
│ │ │ ├── FileHelp.java
│ │ │ ├── ItemTouchCallback.java
│ │ │ ├── LauncherIcon.java
│ │ │ ├── MediaManager.java
│ │ │ ├── ProcessTextHelp.java
│ │ │ ├── ReadBookControl.java
│ │ │ ├── SSLSocketClient.java
│ │ │ ├── UpdateManager.java
│ │ │ ├── WebDavHelp.java
│ │ │ ├── media
│ │ │ │ ├── LoaderCreator.java
│ │ │ │ ├── LocalFileLoader.java
│ │ │ │ └── MediaStoreHelper.java
│ │ │ └── permission
│ │ │ │ ├── ActivitySource.kt
│ │ │ │ ├── FragmentSource.kt
│ │ │ │ ├── OnPermissionsDeniedCallback.kt
│ │ │ │ ├── OnPermissionsGrantedCallback.kt
│ │ │ │ ├── OnPermissionsResultCallback.kt
│ │ │ │ ├── OnRequestPermissionsResultCallback.kt
│ │ │ │ ├── PermissionActivity.kt
│ │ │ │ ├── Permissions.kt
│ │ │ │ ├── PermissionsCompat.kt
│ │ │ │ ├── Request.kt
│ │ │ │ ├── RequestManager.kt
│ │ │ │ ├── RequestPlugins.kt
│ │ │ │ └── RequestSource.kt
│ │ │ ├── model
│ │ │ ├── BookSourceManager.java
│ │ │ ├── ImportBookModel.java
│ │ │ ├── ReplaceRuleManager.java
│ │ │ ├── SavedSource.java
│ │ │ ├── SearchBookModel.java
│ │ │ ├── TxtChapterRuleManager.java
│ │ │ ├── UpLastChapterModel.java
│ │ │ ├── WebBookModel.java
│ │ │ ├── analyzeRule
│ │ │ │ ├── AnalyzeByJSonPath.java
│ │ │ │ ├── AnalyzeByJSoup.java
│ │ │ │ ├── AnalyzeByRegex.java
│ │ │ │ ├── AnalyzeByXPath.java
│ │ │ │ ├── AnalyzeHeaders.java
│ │ │ │ ├── AnalyzeRule.java
│ │ │ │ └── AnalyzeUrl.java
│ │ │ ├── content
│ │ │ │ ├── BookChapterList.java
│ │ │ │ ├── BookContent.java
│ │ │ │ ├── BookInfo.java
│ │ │ │ ├── BookList.java
│ │ │ │ ├── Debug.java
│ │ │ │ ├── VipThrowable.java
│ │ │ │ └── WebBook.java
│ │ │ ├── impl
│ │ │ │ ├── IDownloadTask.java
│ │ │ │ ├── IHttpGetApi.java
│ │ │ │ └── IHttpPostApi.java
│ │ │ └── task
│ │ │ │ ├── AnalyzeNextUrlTask.java
│ │ │ │ ├── CheckSourceTask.java
│ │ │ │ └── DownloadTaskImpl.java
│ │ │ ├── presenter
│ │ │ ├── BookDetailPresenter.java
│ │ │ ├── BookListPresenter.java
│ │ │ ├── BookSourcePresenter.java
│ │ │ ├── ChoiceBookPresenter.java
│ │ │ ├── FindBookPresenter.java
│ │ │ ├── ImportBookPresenter.java
│ │ │ ├── MainPresenter.java
│ │ │ ├── ReadBookPresenter.java
│ │ │ ├── ReplaceRulePresenter.java
│ │ │ ├── SearchBookPresenter.java
│ │ │ ├── SourceEditPresenter.java
│ │ │ ├── TxtChapterRulePresenter.java
│ │ │ └── contract
│ │ │ │ ├── BookDetailContract.java
│ │ │ │ ├── BookListContract.java
│ │ │ │ ├── BookSourceContract.java
│ │ │ │ ├── ChoiceBookContract.java
│ │ │ │ ├── FindBookContract.java
│ │ │ │ ├── ImportBookContract.java
│ │ │ │ ├── MainContract.java
│ │ │ │ ├── ReadBookContract.java
│ │ │ │ ├── ReplaceRuleContract.java
│ │ │ │ ├── SearchBookContract.java
│ │ │ │ ├── SourceEditContract.java
│ │ │ │ └── TxtChapterRuleContract.java
│ │ │ ├── service
│ │ │ ├── CheckSourceService.java
│ │ │ ├── DownloadService.java
│ │ │ ├── MediaButtonIntentReceiver.java
│ │ │ ├── ReadAloudService.java
│ │ │ ├── ShareService.java
│ │ │ └── WebService.java
│ │ │ ├── utils
│ │ │ ├── ACache.java
│ │ │ ├── BatteryUtil.java
│ │ │ ├── BitmapUtil.java
│ │ │ ├── ColorUtil.java
│ │ │ ├── DensityUtil.java
│ │ │ ├── DocumentUtil.java
│ │ │ ├── DrawableUtil.java
│ │ │ ├── EncodingDetect.java
│ │ │ ├── FastXmlSerializer.java
│ │ │ ├── FileStack.java
│ │ │ ├── FileUtils.java
│ │ │ ├── GsonUtils.java
│ │ │ ├── IOUtils.java
│ │ │ ├── ListUtil.java
│ │ │ ├── MD5Utils.java
│ │ │ ├── MarkdownUtils.java
│ │ │ ├── MeUtils.java
│ │ │ ├── NetworkUtils.java
│ │ │ ├── ReadAssets.java
│ │ │ ├── RxUtils.java
│ │ │ ├── ScreenUtils.java
│ │ │ ├── Selector.java
│ │ │ ├── SoftInputUtil.java
│ │ │ ├── StringJoiner.java
│ │ │ ├── StringUtils.java
│ │ │ ├── SystemUtil.java
│ │ │ ├── TimeUtils.java
│ │ │ ├── UrlEncoderUtils.java
│ │ │ ├── XmlUtils.java
│ │ │ ├── ZipUtils.java
│ │ │ ├── bar
│ │ │ │ ├── BarConfig.java
│ │ │ │ ├── BarHide.java
│ │ │ │ ├── BarParams.java
│ │ │ │ ├── FlymeOSStatusBarFontUtils.java
│ │ │ │ ├── ImmersionBar.java
│ │ │ │ ├── KeyboardPatch.java
│ │ │ │ ├── OSUtils.java
│ │ │ │ └── OnKeyboardListener.java
│ │ │ ├── download
│ │ │ │ ├── DownloadUtils.java
│ │ │ │ ├── JsDownloadInterceptor.java
│ │ │ │ ├── JsDownloadListener.java
│ │ │ │ ├── JsResponseBody.java
│ │ │ │ └── Service.java
│ │ │ ├── theme
│ │ │ │ ├── ATH.java
│ │ │ │ ├── ATHUtil.java
│ │ │ │ ├── MaterialValueHelper.java
│ │ │ │ ├── NavigationViewUtil.java
│ │ │ │ ├── ThemeStore.java
│ │ │ │ ├── ThemeStoreInterface.java
│ │ │ │ ├── ThemeStorePrefKeys.java
│ │ │ │ ├── TintHelper.java
│ │ │ │ └── ViewUtil.java
│ │ │ └── web_dav
│ │ │ │ ├── WebDavFile.java
│ │ │ │ └── http
│ │ │ │ ├── Handler.java
│ │ │ │ ├── HttpAuth.java
│ │ │ │ └── OkHttp.java
│ │ │ ├── view
│ │ │ ├── activity
│ │ │ │ ├── AboutActivity.java
│ │ │ │ ├── BookCoverEditActivity.java
│ │ │ │ ├── BookDetailActivity.java
│ │ │ │ ├── BookInfoEditActivity.java
│ │ │ │ ├── BookSourceActivity.java
│ │ │ │ ├── ChapterListActivity.java
│ │ │ │ ├── ChoiceBookActivity.java
│ │ │ │ ├── DonateActivity.java
│ │ │ │ ├── DownloadActivity.java
│ │ │ │ ├── ImportBookActivity.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── QRCodeScanActivity.java
│ │ │ │ ├── ReadBookActivity.java
│ │ │ │ ├── ReadStyleActivity.java
│ │ │ │ ├── ReceivingSharedActivity.java
│ │ │ │ ├── ReplaceRuleActivity.java
│ │ │ │ ├── SearchBookActivity.java
│ │ │ │ ├── SettingActivity.java
│ │ │ │ ├── SourceDebugActivity.java
│ │ │ │ ├── SourceEditActivity.java
│ │ │ │ ├── SourceLoginActivity.java
│ │ │ │ ├── ThemeSettingActivity.java
│ │ │ │ ├── TxtChapterRuleActivity.java
│ │ │ │ ├── WelcomeActivity.java
│ │ │ │ ├── WelcomeBookActivity.java
│ │ │ │ └── WelcomeToReadActivity.java
│ │ │ ├── adapter
│ │ │ │ ├── BookShelfAdapter.java
│ │ │ │ ├── BookShelfGridAdapter.java
│ │ │ │ ├── BookShelfListAdapter.java
│ │ │ │ ├── BookSourceAdapter.java
│ │ │ │ ├── BookmarkAdapter.java
│ │ │ │ ├── ChangeCoverAdapter.java
│ │ │ │ ├── ChangeSourceAdapter.java
│ │ │ │ ├── ChapterListAdapter.java
│ │ │ │ ├── ChoiceBookAdapter.java
│ │ │ │ ├── DownloadAdapter.java
│ │ │ │ ├── FileSystemAdapter.java
│ │ │ │ ├── FindKindAdapter.java
│ │ │ │ ├── FindLeftAdapter.java
│ │ │ │ ├── FindRightAdapter.java
│ │ │ │ ├── ReplaceRuleAdapter.java
│ │ │ │ ├── SearchBookAdapter.java
│ │ │ │ ├── SearchBookshelfAdapter.java
│ │ │ │ ├── SourceDebugAdapter.java
│ │ │ │ ├── SourceEditAdapter.java
│ │ │ │ ├── TxtChapterRuleAdapter.java
│ │ │ │ ├── base
│ │ │ │ │ ├── BaseListAdapter.java
│ │ │ │ │ ├── BaseViewHolder.java
│ │ │ │ │ ├── IViewHolder.java
│ │ │ │ │ ├── OnItemClickListenerTwo.java
│ │ │ │ │ └── ViewHolderImpl.java
│ │ │ │ └── view
│ │ │ │ │ └── FileHolder.java
│ │ │ ├── fragment
│ │ │ │ ├── BaseFileFragment.java
│ │ │ │ ├── BookListFragment.java
│ │ │ │ ├── BookmarkFragment.java
│ │ │ │ ├── ChapterListFragment.java
│ │ │ │ ├── FileCategoryFragment.java
│ │ │ │ ├── FindBookFragment.java
│ │ │ │ ├── LocalBookFragment.java
│ │ │ │ ├── SettingsFragment.java
│ │ │ │ ├── ThemeSettingsFragment.java
│ │ │ │ └── WebDavSettingsFragment.java
│ │ │ └── popupwindow
│ │ │ │ ├── CheckAddShelfPop.java
│ │ │ │ ├── KeyboardToolPop.kt
│ │ │ │ ├── MediaPlayerPop.java
│ │ │ │ ├── MoreSettingPop.java
│ │ │ │ ├── ReadAdjustMarginPop.kt
│ │ │ │ ├── ReadAdjustPop.java
│ │ │ │ ├── ReadBottomMenu.java
│ │ │ │ ├── ReadInterfacePop.java
│ │ │ │ └── ReadLongPressPop.java
│ │ │ ├── web
│ │ │ ├── HttpServer.java
│ │ │ ├── ShareServer.java
│ │ │ ├── WebSocketServer.java
│ │ │ ├── controller
│ │ │ │ ├── BookshelfController.java
│ │ │ │ ├── SourceController.java
│ │ │ │ └── SourceDebugWebSocket.java
│ │ │ └── utils
│ │ │ │ ├── AssetsWeb.java
│ │ │ │ └── ReturnData.java
│ │ │ └── widget
│ │ │ ├── BadgeView.java
│ │ │ ├── CoverImageView.java
│ │ │ ├── FilletImageView.java
│ │ │ ├── HorizontalListView.java
│ │ │ ├── RotateLoading.java
│ │ │ ├── ScrollTextView.java
│ │ │ ├── check_box
│ │ │ └── SmoothCheckBox.java
│ │ │ ├── explosion_field
│ │ │ ├── ExplosionAnimator.java
│ │ │ ├── ExplosionField.java
│ │ │ ├── OnAnimatorListener.java
│ │ │ └── Utils.java
│ │ │ ├── filepicker
│ │ │ ├── adapter
│ │ │ │ ├── FileAdapter.java
│ │ │ │ └── PathAdapter.java
│ │ │ ├── drawable
│ │ │ │ ├── StateBaseDrawable.java
│ │ │ │ └── StateColorDrawable.java
│ │ │ ├── entity
│ │ │ │ ├── FileItem.java
│ │ │ │ └── JavaBean.java
│ │ │ ├── icons
│ │ │ │ └── FilePickerIcon.java
│ │ │ ├── picker
│ │ │ │ └── FilePicker.java
│ │ │ ├── popup
│ │ │ │ ├── BasicPopup.java
│ │ │ │ └── ConfirmPopup.java
│ │ │ └── util
│ │ │ │ ├── ConvertUtils.java
│ │ │ │ ├── DateUtils.java
│ │ │ │ ├── FileUtils.java
│ │ │ │ ├── ScreenUtils.java
│ │ │ │ └── StorageUtils.java
│ │ │ ├── font
│ │ │ ├── FontAdapter.java
│ │ │ └── FontSelector.java
│ │ │ ├── itemdecoration
│ │ │ ├── DividerGridItemDecoration.java
│ │ │ └── DividerItemDecoration.java
│ │ │ ├── modialog
│ │ │ ├── BaseDialog.java
│ │ │ ├── BookmarkDialog.java
│ │ │ ├── ChangeCoverDialog.java
│ │ │ ├── ChangeSourceDialog.java
│ │ │ ├── DownLoadDialog.java
│ │ │ ├── InputDialog.java
│ │ │ ├── MoDialogHUD.java
│ │ │ ├── MoDialogView.java
│ │ │ ├── ReplaceRuleDialog.java
│ │ │ └── TxtChapterRuleDialog.java
│ │ │ ├── number
│ │ │ ├── NumberButton.java
│ │ │ ├── NumberPickerDialog.java
│ │ │ └── NumberPickerPreference.java
│ │ │ ├── page
│ │ │ ├── ChapterProvider.java
│ │ │ ├── PageLoader.java
│ │ │ ├── PageLoaderEpub.java
│ │ │ ├── PageLoaderNet.java
│ │ │ ├── PageLoaderText.java
│ │ │ ├── PageView.java
│ │ │ ├── TxtChapter.kt
│ │ │ ├── TxtChar.kt
│ │ │ ├── TxtLine.kt
│ │ │ ├── TxtPage.kt
│ │ │ └── animation
│ │ │ │ ├── CoverPageAnim.java
│ │ │ │ ├── HorizonPageAnim.java
│ │ │ │ ├── NonePageAnim.java
│ │ │ │ ├── PageAnimation.java
│ │ │ │ ├── ScrollPageAnim.java
│ │ │ │ ├── SimulationPageAnim.java
│ │ │ │ └── SlidePageAnim.java
│ │ │ ├── prefs
│ │ │ ├── ATEPreferenceCategory.java
│ │ │ ├── ATESwitchPreference.java
│ │ │ └── IconListPreference.java
│ │ │ ├── recycler
│ │ │ ├── expandable
│ │ │ │ ├── BaseExpandAbleViewHolder.java
│ │ │ │ ├── BaseExpandableRecyclerAdapter.java
│ │ │ │ ├── OnRecyclerViewListener.java
│ │ │ │ └── bean
│ │ │ │ │ ├── BaseItem.java
│ │ │ │ │ ├── GroupItem.java
│ │ │ │ │ └── RecyclerViewData.java
│ │ │ ├── refresh
│ │ │ │ ├── BaseRefreshListener.java
│ │ │ │ ├── OnLoadMoreListener.java
│ │ │ │ ├── OnRefreshWithProgressListener.java
│ │ │ │ ├── RefreshLayout.java
│ │ │ │ ├── RefreshProgressBar.java
│ │ │ │ ├── RefreshRecyclerView.java
│ │ │ │ ├── RefreshRecyclerViewAdapter.java
│ │ │ │ └── RefreshScrollView.java
│ │ │ ├── scroller
│ │ │ │ ├── FastScrollRecyclerView.java
│ │ │ │ ├── FastScrollStateChangeListener.java
│ │ │ │ └── FastScroller.java
│ │ │ └── sectioned
│ │ │ │ ├── GridSpacingItemDecoration.java
│ │ │ │ ├── SectionedRecyclerViewAdapter.java
│ │ │ │ └── SectionedSpanSizeLookup.java
│ │ │ └── views
│ │ │ ├── ATEAccentBgTextView.java
│ │ │ ├── ATEAccentStrokeTextView.java
│ │ │ ├── ATEAutoCompleteTextView.java
│ │ │ ├── ATECheckBox.java
│ │ │ ├── ATEEditText.java
│ │ │ ├── ATEPrimaryTextView.java
│ │ │ ├── ATEProgressBar.java
│ │ │ ├── ATERadioButton.java
│ │ │ ├── ATERadioNoButton.java
│ │ │ ├── ATESecondaryTextView.java
│ │ │ ├── ATESeekBar.java
│ │ │ ├── ATEStockSwitch.java
│ │ │ ├── ATEStrokeTextView.java
│ │ │ ├── ATESwitch.java
│ │ │ └── ATETextInputLayout.java
│ └── res
│ │ ├── anim
│ │ ├── anim_none.xml
│ │ ├── anim_readbook_bottom_in.xml
│ │ ├── anim_readbook_bottom_out.xml
│ │ ├── anim_readbook_top_in.xml
│ │ ├── anim_readbook_top_out.xml
│ │ ├── moprogress_bottom_in.xml
│ │ ├── moprogress_bottom_out.xml
│ │ ├── moprogress_in.xml
│ │ ├── moprogress_in_bottom_right.xml
│ │ ├── moprogress_in_top_right.xml
│ │ ├── moprogress_out.xml
│ │ ├── moprogress_out_bottom_right.xml
│ │ └── moprogress_out_top_right.xml
│ │ ├── color
│ │ └── selector_menu_text.xml
│ │ ├── drawable-v21
│ │ ├── bg_ib_pre.xml
│ │ └── bg_ib_pre_round.xml
│ │ ├── drawable
│ │ ├── bg_chapter_item_divider.xml
│ │ ├── bg_edit.xml
│ │ ├── bg_ib_pre.xml
│ │ ├── bg_ib_pre_round.xml
│ │ ├── bg_shadow_bottom.png
│ │ ├── bg_shadow_bottom_night.png
│ │ ├── bg_shadow_top.png
│ │ ├── bg_shadow_top_night.png
│ │ ├── bg_textfield_search.xml
│ │ ├── fastscroll_bubble.xml
│ │ ├── fastscroll_handle.xml
│ │ ├── fastscroll_track.xml
│ │ ├── ic_about.xml
│ │ ├── ic_add.xml
│ │ ├── ic_add_online.xml
│ │ ├── ic_arrange.xml
│ │ ├── ic_arrow_back.xml
│ │ ├── ic_arrow_drop_down.xml
│ │ ├── ic_arrow_drop_up.xml
│ │ ├── ic_author.xml
│ │ ├── ic_auto_page.xml
│ │ ├── ic_auto_page_stop.xml
│ │ ├── ic_back_last.xml
│ │ ├── ic_backup.xml
│ │ ├── ic_book_has.xml
│ │ ├── ic_book_last.xml
│ │ ├── ic_book_source_manage.xml
│ │ ├── ic_bookmark.xml
│ │ ├── ic_brightness.xml
│ │ ├── ic_bug_report_black_24dp.xml
│ │ ├── ic_cancel.xml
│ │ ├── ic_chapter_list.xml
│ │ ├── ic_check.xml
│ │ ├── ic_check_source.xml
│ │ ├── ic_clear_all.xml
│ │ ├── ic_copy.xml
│ │ ├── ic_cursor_left.xml
│ │ ├── ic_cursor_right.xml
│ │ ├── ic_daytime.xml
│ │ ├── ic_disclaimer.xml
│ │ ├── ic_donate.xml
│ │ ├── ic_download.xml
│ │ ├── ic_download_line.xml
│ │ ├── ic_edit.xml
│ │ ├── ic_exchange.xml
│ │ ├── ic_expand_less_24dp.xml
│ │ ├── ic_expand_more_24dp.xml
│ │ ├── ic_faq.xml
│ │ ├── ic_find_replace.xml
│ │ ├── ic_folder.xml
│ │ ├── ic_format_line_spacing.xml
│ │ ├── ic_groups.xml
│ │ ├── ic_history.xml
│ │ ├── ic_import.xml
│ │ ├── ic_interface_setting.xml
│ │ ├── ic_last_read.xml
│ │ ├── ic_launch.xml
│ │ ├── ic_list.xml
│ │ ├── ic_mail.xml
│ │ ├── ic_more_vert.xml
│ │ ├── ic_network_check.xml
│ │ ├── ic_pause_24dp.xml
│ │ ├── ic_pause_outline_24dp.xml
│ │ ├── ic_play_24dp.xml
│ │ ├── ic_play_outline_24dp.xml
│ │ ├── ic_qq_group.xml
│ │ ├── ic_read.xml
│ │ ├── ic_read_aloud.xml
│ │ ├── ic_read_book.png
│ │ ├── ic_refresh_black_24dp.xml
│ │ ├── ic_refresh_white_24dp.xml
│ │ ├── ic_remove.xml
│ │ ├── ic_restore.xml
│ │ ├── ic_save.xml
│ │ ├── ic_scan.xml
│ │ ├── ic_scoring.xml
│ │ ├── ic_search.xml
│ │ ├── ic_select_all.xml
│ │ ├── ic_settings.xml
│ │ ├── ic_share.xml
│ │ ├── ic_skip_next.xml
│ │ ├── ic_skip_previous.xml
│ │ ├── ic_stop_black_24dp.xml
│ │ ├── ic_swap_outline_24dp.xml
│ │ ├── ic_theme.xml
│ │ ├── ic_time_add_24dp.xml
│ │ ├── ic_timer_black_24dp.xml
│ │ ├── ic_toc.xml
│ │ ├── ic_top_source.xml
│ │ ├── ic_translate.xml
│ │ ├── ic_tune.xml
│ │ ├── ic_update.xml
│ │ ├── ic_version.xml
│ │ ├── ic_view_quilt.xml
│ │ ├── ic_volume_up.xml
│ │ ├── ic_web_outline.xml
│ │ ├── ic_web_service_noti.xml
│ │ ├── ic_web_service_phone.xml
│ │ ├── icon_image.png
│ │ ├── image_welcome.xml
│ │ ├── img_cover_default.jpg
│ │ ├── img_cover_gs.jpg
│ │ ├── searchview_line.xml
│ │ ├── selector_common_bg.xml
│ │ ├── selector_fillet_btn_bg.xml
│ │ ├── selector_tv_black.xml
│ │ ├── shadow_grid.9.png
│ │ ├── shape_card_view.xml
│ │ ├── shape_fillet_btn.xml
│ │ ├── shape_fillet_btn_press.xml
│ │ ├── shape_pop_checkaddshelf_bg.xml
│ │ ├── shape_radius_1dp.xml
│ │ ├── shape_space_divider.xml
│ │ └── shape_text_cursor.xml
│ │ ├── layout
│ │ ├── activity_about.xml
│ │ ├── activity_book_choice.xml
│ │ ├── activity_book_cover_edit.xml
│ │ ├── activity_book_detail.xml
│ │ ├── activity_book_info_edit.xml
│ │ ├── activity_book_read.xml
│ │ ├── activity_book_source.xml
│ │ ├── activity_chapterlist.xml
│ │ ├── activity_donate.xml
│ │ ├── activity_import_book.xml
│ │ ├── activity_main.xml
│ │ ├── activity_qrcode_capture.xml
│ │ ├── activity_read_style.xml
│ │ ├── activity_recycler_vew.xml
│ │ ├── activity_search_book.xml
│ │ ├── activity_settings.xml
│ │ ├── activity_source_debug.xml
│ │ ├── activity_source_edit.xml
│ │ ├── activity_source_login.xml
│ │ ├── activity_update.xml
│ │ ├── activity_welcome.xml
│ │ ├── content_main.xml
│ │ ├── dialog_bookmark.xml
│ │ ├── dialog_change_source.xml
│ │ ├── dialog_download_choice.xml
│ │ ├── dialog_input.xml
│ │ ├── dialog_number_picker.xml
│ │ ├── dialog_replace_rule.xml
│ │ ├── dialog_txt_chpater_rule.xml
│ │ ├── fragment_book_find.xml
│ │ ├── fragment_book_list.xml
│ │ ├── fragment_bookmark_list.xml
│ │ ├── fragment_chapter_list.xml
│ │ ├── fragment_file_category.xml
│ │ ├── fragment_local_book.xml
│ │ ├── item_1line_text_and_del.xml
│ │ ├── item_book_source.xml
│ │ ├── item_bookshelf_grid.xml
│ │ ├── item_bookshelf_list.xml
│ │ ├── item_change_cover.xml
│ │ ├── item_change_source.xml
│ │ ├── item_chapter_list.xml
│ │ ├── item_download.xml
│ │ ├── item_file.xml
│ │ ├── item_file_filepicker.xml
│ │ ├── item_find1_group.xml
│ │ ├── item_find1_kind.xml
│ │ ├── item_find2_childer_view.xml
│ │ ├── item_find2_header_view.xml
│ │ ├── item_find_left.xml
│ │ ├── item_font.xml
│ │ ├── item_icon_preference.xml
│ │ ├── item_path_filepicker.xml
│ │ ├── item_read_bg.xml
│ │ ├── item_replace_rule.xml
│ │ ├── item_search_book.xml
│ │ ├── item_search_history.xml
│ │ ├── item_source_debug.xml
│ │ ├── item_source_edit.xml
│ │ ├── item_text.xml
│ │ ├── mo_dialog_image_text.xml
│ │ ├── mo_dialog_infor.xml
│ │ ├── mo_dialog_loading.xml
│ │ ├── mo_dialog_markdown.xml
│ │ ├── mo_dialog_text_large.xml
│ │ ├── mo_dialog_two.xml
│ │ ├── navigation_header.xml
│ │ ├── pop_media_player.xml
│ │ ├── pop_more_setting.xml
│ │ ├── pop_read_adjust.xml
│ │ ├── pop_read_adjust_margin.xml
│ │ ├── pop_read_interface.xml
│ │ ├── pop_read_long_press.xml
│ │ ├── pop_read_menu.xml
│ │ ├── popup_keyboard_tool.xml
│ │ ├── tab_view_icon_right.xml
│ │ ├── view_empty.xml
│ │ ├── view_fastscroller.xml
│ │ ├── view_file_picker.xml
│ │ ├── view_icon.xml
│ │ ├── view_loading.xml
│ │ ├── view_net_error.xml
│ │ ├── view_night_theme.xml
│ │ ├── view_number_buttom.xml
│ │ ├── view_recycler_font.xml
│ │ ├── view_refresh_error.xml
│ │ ├── view_refresh_load_more.xml
│ │ ├── view_refresh_no_data.xml
│ │ └── view_refresh_recycler.xml
│ │ ├── menu
│ │ ├── menu_book_download.xml
│ │ ├── menu_book_info.xml
│ │ ├── menu_book_read_activity.xml
│ │ ├── menu_book_search_activity.xml
│ │ ├── menu_book_source_activity.xml
│ │ ├── menu_book_source_edit.xml
│ │ ├── menu_debug_activity.xml
│ │ ├── menu_main_activity.xml
│ │ ├── menu_main_drawer.xml
│ │ ├── menu_qr_code_scan.xml
│ │ ├── menu_read_style_activity.xml
│ │ ├── menu_replace_rule_activity.xml
│ │ ├── menu_search_view.xml
│ │ ├── menu_source_login.xml
│ │ ├── menu_txt_chapter_rule_activity.xml
│ │ └── menu_update_activity.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── book_launcher.xml
│ │ ├── book_launcher_round.xml
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── book_launcher.png
│ │ ├── book_launcher_foreground.png
│ │ ├── book_launcher_round.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── book_launcher.png
│ │ ├── book_launcher_foreground.png
│ │ ├── book_launcher_round.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── book_launcher.png
│ │ ├── book_launcher_foreground.png
│ │ ├── book_launcher_round.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── book_launcher.png
│ │ ├── book_launcher_foreground.png
│ │ ├── book_launcher_round.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── book_launcher.png
│ │ ├── book_launcher_foreground.png
│ │ ├── book_launcher_round.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── raw
│ │ └── silent_sound.mp3
│ │ ├── values-night
│ │ ├── colors.xml
│ │ └── styles.xml
│ │ ├── values-v27
│ │ └── styles.xml
│ │ ├── values-v28
│ │ └── styles.xml
│ │ ├── values-zh-rCN
│ │ └── strings.xml
│ │ ├── values-zh-rTW
│ │ └── strings.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── attrs.xml
│ │ ├── book_launcher_background.xml
│ │ ├── colors.xml
│ │ ├── colors_material_design.xml
│ │ ├── dimens.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ids.xml
│ │ ├── pref_key_value.xml
│ │ ├── strings.xml
│ │ ├── strings_me.xml
│ │ └── styles.xml
│ │ └── xml
│ │ ├── file_paths.xml
│ │ ├── network_security_config.xml
│ │ ├── pref_settings.xml
│ │ ├── pref_settings_theme.xml
│ │ ├── pref_settings_web_dav.xml
│ │ └── shortcuts.xml
│ └── test
│ └── java
│ └── com
│ └── kunfei
│ └── bookshelf
│ └── ExampleUnitTest.java
├── basemvplib
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── kunfei
│ │ │ └── basemvplib
│ │ │ ├── AppActivityManager.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── BaseFragment.java
│ │ │ ├── BasePresenterImpl.java
│ │ │ ├── BitIntentDataManager.java
│ │ │ └── impl
│ │ │ ├── IPresenter.java
│ │ │ └── IView.java
│ └── res
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ ├── colors.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── kunfei
│ └── basemvplib
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── mail
├── settings.gradle
└── tool
└── 书源整理工具
├── BookSourceMgr.dpr
├── BookSourceMgr.dproj
├── BookSourceMgr.res
├── ReadMe.txt
├── bin
└── 书源整理工具(2019.08.15).zip
├── doc
└── Main.ico
├── uBookSourceBean.pas
├── uFrmEditSource.dfm
├── uFrmEditSource.pas
├── uFrmMain.dfm
├── uFrmMain.pas
├── uFrmReplaceGroup.dfm
├── uFrmReplaceGroup.pas
├── uFrmWait.dfm
└── uFrmWait.pas
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | /.gradle
3 | /.idea
4 | .DS_Store
5 | /local.properties
6 | /build
7 | /captures
8 | /app/release/
9 | google-services.json
10 |
11 | src/androidTest/
12 | /back
13 | /tool/书源整理工具/bin/*.exe
14 | /tool/书源整理工具/*.otares
15 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /src/main/java/com/kunfei/bookshelf/dao/
3 |
--------------------------------------------------------------------------------
/app/MyBookshelf_Keys.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/MyBookshelf_Keys.zip
--------------------------------------------------------------------------------
/app/ReadMe.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/ReadMe.md
--------------------------------------------------------------------------------
/app/gradle.properties:
--------------------------------------------------------------------------------
1 | # RELEASE_STORE_FILE = "..\\key.properties.jks"
2 | RELEASE_STORE_FILE=.\\key.properties.jks
3 | RELEASE_KEY_PASSWORD=android
4 | RELEASE_KEY_ALIAS=key0
5 | RELEASE_STORE_PASSWORD=android
--------------------------------------------------------------------------------
/app/key.properties.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/key.properties.jks
--------------------------------------------------------------------------------
/app/src/debug/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 阅读.debug
3 | 阅读.debug·搜索
4 |
--------------------------------------------------------------------------------
/app/src/main/assets/bg/中国红.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/中国红.png
--------------------------------------------------------------------------------
/app/src/main/assets/bg/午后沙滩.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/午后沙滩.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/宁静夜色.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/宁静夜色.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/小清新.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/小清新.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/山水墨影.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/山水墨影.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/山水画.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/山水画.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/护眼漫绿.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/护眼漫绿.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/新羊皮纸.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/新羊皮纸.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/明媚倾城.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/明媚倾城.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/浅黄飘带.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/浅黄飘带.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/深宫魅影.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/深宫魅影.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/清新.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/清新.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/清新时光.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/清新时光.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/羊皮纸1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/羊皮纸1.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/羊皮纸3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/羊皮纸3.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/羊皮纸4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/羊皮纸4.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/边彩画布.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/边彩画布.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/bg/雾花.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/bg/雾花.jpg
--------------------------------------------------------------------------------
/app/src/main/assets/disclaimer.md:
--------------------------------------------------------------------------------
1 | # 免责声明(Disclaimer)
2 |
3 | * 阅读是一款提供网络文学搜索的工具,为广大网络文学爱好者提供一种方便、快捷舒适的试读体验。
4 | * 当您搜索一本书的时,阅读会将该书的书名以关键词的形式提交到各个第三方网络文学网站。
5 | 各第三方网站返回的内容与阅读无关,阅读对其概不负责,亦不承担任何法律责任。
6 | 任何通过使用阅读而链接到的第三方网页均系他人制作或提供,您可能从第三方网页上获得其他服务,阅读对其合法性概不负责,亦不承担任何法律责任。
7 | 第三方搜索引擎结果根据您提交的书名自动搜索获得并提供试读,不代表阅读赞成或被搜索链接到的第三方网页上的内容或立场。
8 | 您应该对使用搜索引擎的结果自行承担风险。
9 | * 阅读不做任何形式的保证:不保证第三方搜索引擎的搜索结果满足您的要求,不保证搜索服务不中断,不保证搜索结果的安全性、正确性、及时性、合法性。
10 | 因网络状况、通讯线路、第三方网站等任何原因而导致您不能正常使用阅读,阅读不承担任何法律责任。
11 | 阅读尊重并保护所有使用阅读用户的个人隐私权,您注册的用户名、电子邮件地址等个人资料,非经您亲自许可或根据相关法律、法规的强制性规定,阅读不会主动地泄露给第三方。
12 | * 阅读致力于最大程度地减少网络文学阅读者在自行搜寻过程中的无意义的时间浪费,通过专业搜索展示不同网站中网络文学的最新章节。
13 | 阅读在为广大小说爱好者提供方便、快捷舒适的试读体验的同时,也使优秀网络文学得以迅速、更广泛的传播,从而达到了在一定程度促进网络文学充分繁荣发展之目的。
14 | 阅读鼓励广大小说爱好者通过阅读发现优秀网络小说及其提供商,并建议阅读正版图书。
15 | 任何单位或个人认为通过阅读搜索链接到的第三方网页内容可能涉嫌侵犯其信息网络传播权,应该及时向阅读提出书面权力通知,并提供身份证明、权属证明及详细侵权情况证明。
16 | 阅读在收到上述法律文件后,将会依法尽快断开相关链接内容。
--------------------------------------------------------------------------------
/app/src/main/assets/number.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/assets/number.ttf
--------------------------------------------------------------------------------
/app/src/main/assets/txtChapterRule.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "enable": true,
4 | "name": "默认正则1",
5 | "rule": "^(.{0,8})(第)([0-9零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10})([章节卷集部篇回场])(.{0,30})$",
6 | "serialNumber": 0
7 | },
8 | {
9 | "enable": true,
10 | "name": "默认正则2",
11 | "rule": "^([0-9]{1,5})([\\,\\.,-])(.{1,20})$",
12 | "serialNumber": 1
13 | },
14 | {
15 | "enable": true,
16 | "name": "默认正则3",
17 | "rule": "^(\\s{0,4})([\\(【《]?(卷)?)([0-9零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10})([\\.:: \f\t])(.{0,30})$",
18 | "serialNumber": 2
19 | },
20 | {
21 | "enable": true,
22 | "name": "默认正则4",
23 | "rule": "^(\\s{0,4})([\\((【《])(.{0,30})([\\))】》])(\\s{0,2})$",
24 | "serialNumber": 3
25 | },
26 | {
27 | "enable": true,
28 | "name": "默认正则5",
29 | "rule": "^(\\s{0,4})(正文)(.{0,20})$",
30 | "serialNumber": 4
31 | },
32 | {
33 | "enable": true,
34 | "name": "默认正则6",
35 | "rule": "^(.{0,4})(Chapter|chapter)(\\s{0,4})([0-9]{1,4})(.{0,30})$",
36 | "serialNumber": 5
37 | }
38 | ]
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/InfiniteScrollListener.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter
2 |
3 | import androidx.recyclerview.widget.LinearLayoutManager
4 | import androidx.recyclerview.widget.RecyclerView
5 |
6 | /**
7 | * Created by Invincible on 2017/12/15.
8 | *
9 | * 上拉加载更多
10 | */
11 | abstract class InfiniteScrollListener() : RecyclerView.OnScrollListener() {
12 | private val loadMoreRunnable = Runnable { onLoadMore() }
13 |
14 | override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
15 | // if (dy < 0 || dataLoading.isDataLoading()) return
16 |
17 | val layoutManager: LinearLayoutManager = recyclerView.layoutManager as LinearLayoutManager
18 | val visibleItemCount = recyclerView.childCount
19 | val totalItemCount = layoutManager.itemCount
20 | val firstVisibleItem = layoutManager.findFirstVisibleItemPosition()
21 |
22 | if (totalItemCount - visibleItemCount <= firstVisibleItem + VISIBLE_THRESHOLD) {
23 | recyclerView.post(loadMoreRunnable)
24 | }
25 | }
26 |
27 | abstract fun onLoadMore()
28 |
29 | companion object {
30 | private const val VISIBLE_THRESHOLD = 5
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/ItemViewDelegate.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter
2 |
3 | import android.content.Context
4 |
5 | /**
6 | * Created by Invincible on 2017/11/24.
7 | *
8 | * item代理,
9 | */
10 | abstract class ItemViewDelegate- (protected val context: Context, val layoutId: Int) {
11 |
12 | abstract fun convert(holder: ItemViewHolder, item: ITEM, payloads: MutableList)
13 |
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/ItemViewHolder.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter
2 |
3 | import android.view.View
4 | import androidx.recyclerview.widget.RecyclerView
5 |
6 | /**
7 | * Created by Invincible on 2017/11/28.
8 | */
9 | class ItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/SimpleRecyclerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter
2 |
3 | import android.content.Context
4 |
5 | /**
6 | * Created by Invincible on 2017/12/15.
7 | */
8 | abstract class SimpleRecyclerAdapter
- (context: Context, private val layoutId: Int) :
9 | CommonRecyclerAdapter
- (context) {
10 |
11 | init {
12 | addItemViewDelegate(object : ItemViewDelegate
- (context, layoutId) {
13 |
14 | override fun convert(holder: ItemViewHolder, item: ITEM, payloads: MutableList) {
15 | this@SimpleRecyclerAdapter.convert(holder, item, payloads)
16 | }
17 |
18 | })
19 | }
20 |
21 | abstract fun convert(holder: ItemViewHolder, item: ITEM, payloads: MutableList)
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/animations/AlphaInAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter.animations
2 |
3 | import android.animation.Animator
4 | import android.animation.ObjectAnimator
5 | import android.view.View
6 |
7 |
8 | class AlphaInAnimation @JvmOverloads constructor(private val mFrom: Float = DEFAULT_ALPHA_FROM) : BaseAnimation {
9 |
10 | override fun getAnimators(view: View): Array =
11 | arrayOf(ObjectAnimator.ofFloat(view, "alpha", mFrom, 1f))
12 |
13 | companion object {
14 |
15 | private const val DEFAULT_ALPHA_FROM = 0f
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/animations/BaseAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter.animations
2 |
3 | import android.animation.Animator
4 | import android.view.View
5 |
6 | /**
7 | * adapter item 动画
8 | */
9 | interface BaseAnimation {
10 |
11 | fun getAnimators(view: View): Array
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/animations/ScaleInAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter.animations
2 |
3 | import android.animation.Animator
4 | import android.animation.ObjectAnimator
5 | import android.view.View
6 |
7 |
8 | class ScaleInAnimation @JvmOverloads constructor(private val mFrom: Float = DEFAULT_SCALE_FROM) : BaseAnimation {
9 |
10 | override fun getAnimators(view: View): Array {
11 | val scaleX = ObjectAnimator.ofFloat(view, "scaleX", mFrom, 1f)
12 | val scaleY = ObjectAnimator.ofFloat(view, "scaleY", mFrom, 1f)
13 | return arrayOf(scaleX, scaleY)
14 | }
15 |
16 | companion object {
17 |
18 | private const val DEFAULT_SCALE_FROM = .5f
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/animations/SlideInBottomAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter.animations
2 |
3 | import android.animation.Animator
4 | import android.animation.ObjectAnimator
5 | import android.view.View
6 |
7 | class SlideInBottomAnimation : BaseAnimation {
8 |
9 |
10 | override fun getAnimators(view: View): Array =
11 | arrayOf(ObjectAnimator.ofFloat(view, "translationY", view.measuredHeight.toFloat(), 0f))
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/animations/SlideInLeftAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter.animations
2 |
3 | import android.animation.Animator
4 | import android.animation.ObjectAnimator
5 | import android.view.View
6 |
7 |
8 | class SlideInLeftAnimation : BaseAnimation {
9 |
10 |
11 | override fun getAnimators(view: View): Array =
12 | arrayOf(ObjectAnimator.ofFloat(view, "translationX", -view.rootView.width.toFloat(), 0f))
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/adapter/animations/SlideInRightAnimation.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.adapter.animations
2 |
3 | import android.animation.Animator
4 | import android.animation.ObjectAnimator
5 | import android.view.View
6 |
7 |
8 | class SlideInRightAnimation : BaseAnimation {
9 |
10 |
11 | override fun getAnimators(view: View): Array =
12 | arrayOf(ObjectAnimator.ofFloat(view, "translationX", view.rootView.width.toFloat(), 0f))
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/observer/MyObserver.java:
--------------------------------------------------------------------------------
1 | //Copyright (c) 2017. 章钦豪. All rights reserved.
2 | package com.kunfei.bookshelf.base.observer;
3 |
4 | import io.reactivex.Observer;
5 | import io.reactivex.disposables.Disposable;
6 |
7 | public abstract class MyObserver implements Observer {
8 |
9 | @Override
10 | public void onSubscribe(Disposable d) {
11 |
12 | }
13 |
14 | @Override
15 | public void onError(Throwable e) {
16 |
17 | }
18 |
19 | @Override
20 | public void onComplete() {
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/base/observer/MySingleObserver.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.base.observer;
2 |
3 | import io.reactivex.SingleObserver;
4 | import io.reactivex.disposables.Disposable;
5 |
6 | public abstract class MySingleObserver implements SingleObserver {
7 |
8 | @Override
9 | public void onSubscribe(Disposable d) {
10 |
11 | }
12 |
13 | @Override
14 | public void onError(Throwable e) {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/BaseBookBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | import java.util.Map;
4 |
5 | public interface BaseBookBean {
6 |
7 | String getTag();
8 |
9 | String getNoteUrl();
10 |
11 | void setNoteUrl(String noteUrl);
12 |
13 | String getVariable();
14 |
15 | void setVariable(String variable);
16 |
17 | void putVariable(String key, String value);
18 |
19 | Map getVariableMap();
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/BaseChapterBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | public interface BaseChapterBean {
4 |
5 | String getTag();
6 |
7 | String getDurChapterUrl();
8 |
9 | int getDurChapterIndex();
10 |
11 | String getNoteUrl();
12 |
13 | String getDurChapterName();
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/FindKindBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | public class FindKindBean {
4 | private String group;
5 | private String tag;
6 | private String kindName;
7 | private String kindUrl;
8 |
9 | public FindKindBean() {
10 |
11 | }
12 |
13 | public String getKindName() {
14 | return kindName;
15 | }
16 |
17 | public void setKindName(String kindName) {
18 | this.kindName = kindName;
19 | }
20 |
21 | public String getKindUrl() {
22 | return kindUrl;
23 | }
24 |
25 | public void setKindUrl(String kindUrl) {
26 | this.kindUrl = kindUrl;
27 | }
28 |
29 | public String getTag() {
30 | return tag;
31 | }
32 |
33 | public void setTag(String tag) {
34 | this.tag = tag;
35 | }
36 |
37 | public String getGroup() {
38 | return group;
39 | }
40 |
41 | public void setGroup(String group) {
42 | this.group = group;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/FindKindGroupBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | public class FindKindGroupBean {
4 | private String groupName;
5 | private String groupTag;
6 |
7 | public String getGroupName() {
8 | return groupName;
9 | }
10 |
11 | public void setGroupName(String groupName) {
12 | this.groupName = groupName;
13 | }
14 |
15 | public String getGroupTag() {
16 | return groupTag;
17 | }
18 |
19 | public void setGroupTag(String groupTag) {
20 | this.groupTag = groupTag;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/LocBookShelfBean.java:
--------------------------------------------------------------------------------
1 | //Copyright (c) 2017. 章钦豪. All rights reserved.
2 | package com.kunfei.bookshelf.bean;
3 |
4 | public class LocBookShelfBean {
5 | private Boolean isNew;
6 | private BookShelfBean bookShelfBean;
7 |
8 | public LocBookShelfBean(Boolean isNew, BookShelfBean bookShelfBean) {
9 | this.isNew = isNew;
10 | this.bookShelfBean = bookShelfBean;
11 | }
12 |
13 | public Boolean getNew() {
14 | return isNew;
15 | }
16 |
17 | public void setNew(Boolean aNew) {
18 | isNew = aNew;
19 | }
20 |
21 | public BookShelfBean getBookShelfBean() {
22 | return bookShelfBean;
23 | }
24 |
25 | public void setBookShelfBean(BookShelfBean bookShelfBean) {
26 | this.bookShelfBean = bookShelfBean;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/OpenChapterBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | public class OpenChapterBean {
4 | private int chapterIndex;
5 | private int pageIndex;
6 |
7 | public OpenChapterBean(int chapterIndex, int pageIndex) {
8 | this.chapterIndex = chapterIndex;
9 | this.pageIndex = pageIndex;
10 | }
11 |
12 | public int getChapterIndex() {
13 | return chapterIndex;
14 | }
15 |
16 | public int getPageIndex() {
17 | return pageIndex;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/TwoDataBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | public class TwoDataBean {
4 | private T data1;
5 | private S data2;
6 |
7 | public TwoDataBean(T data1, S data2) {
8 | this.data1 = data1;
9 | this.data2 = data2;
10 | }
11 |
12 | public T getData1() {
13 | return data1;
14 | }
15 |
16 | public S getData2() {
17 | return data2;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/bean/WebChapterBean.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.bean;
2 |
3 | import java.util.LinkedHashSet;
4 | import java.util.List;
5 |
6 | public class WebChapterBean {
7 | private String url;
8 |
9 | private List data;
10 |
11 | private LinkedHashSet nextUrlList;
12 |
13 | public WebChapterBean(String url) {
14 | this.url = url;
15 | }
16 |
17 | public WebChapterBean(List data, LinkedHashSet nextUrlList) {
18 | this.data = data;
19 | this.nextUrlList = nextUrlList;
20 | }
21 |
22 | public List getData() {
23 | return data;
24 | }
25 |
26 | public void setData(List data) {
27 | this.data = data;
28 | }
29 |
30 | public LinkedHashSet getNextUrlList() {
31 | return nextUrlList;
32 | }
33 |
34 | public String getUrl() {
35 | return url;
36 | }
37 |
38 | public boolean noData() {
39 | return data == null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/constant/BookType.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.constant;
2 |
3 | public class BookType {
4 | public final static String AUDIO = "AUDIO";
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/constant/TimeConstants.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.constant;
2 |
3 | import androidx.annotation.IntDef;
4 |
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 |
8 | public class TimeConstants {
9 | public static final int MSEC = 1;
10 | public static final int SEC = 1000;
11 | public static final int MIN = 60000;
12 | public static final int HOUR = 3600000;
13 | public static final int DAY = 86400000;
14 |
15 | @IntDef({MSEC, SEC, MIN, HOUR, DAY})
16 | @Retention(RetentionPolicy.SOURCE)
17 | public @interface Unit {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/Donate.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 |
7 | import java.net.URLEncoder;
8 |
9 | /**
10 | * Created by GKF on 2017/12/18.
11 | * 捐赠
12 | */
13 |
14 | public class Donate {
15 |
16 | public static void aliDonate(Context context) {
17 | try {
18 | String qrCode = URLEncoder.encode("tsx06677nwdk3javroq4ef0", "utf-8");
19 | final String aliPayQr = "alipayqr://platformapi/startapp?saId=10000007&qrcode=https://qr.alipay.com/" + qrCode;
20 | openUri(context, aliPayQr);
21 | } catch (Exception e) {
22 | e.printStackTrace();
23 | }
24 | }
25 |
26 | /**
27 | * 发送一个intent
28 | */
29 | private static void openUri(Context context, String s) {
30 | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
31 | context.startActivity(intent);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/ProcessTextHelp.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help;
2 |
3 | import android.content.ComponentName;
4 | import android.content.pm.PackageManager;
5 |
6 | import com.kunfei.bookshelf.MApplication;
7 |
8 | public class ProcessTextHelp {
9 |
10 | private static PackageManager packageManager = MApplication.getInstance().getPackageManager();
11 | private static ComponentName componentName = new ComponentName(MApplication.getInstance(), "com.kunfei.bookshelf.view.activity.ReceivingSharedActivity");
12 |
13 | public static boolean isProcessTextEnabled() {
14 | return packageManager.getComponentEnabledSetting(componentName) != PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
15 | }
16 |
17 | public static void setProcessTextEnable(boolean enable) {
18 | if (enable) {
19 | packageManager.setComponentEnabledSetting(componentName,
20 | PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
21 | } else {
22 | packageManager.setComponentEnabledSetting(componentName,
23 | PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
24 | }
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/media/LoaderCreator.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.media;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 |
6 | import androidx.loader.content.CursorLoader;
7 |
8 | /**
9 | * Created by newbiechen on 2018/1/14.
10 | */
11 |
12 | public class LoaderCreator {
13 | public static final int ALL_BOOK_FILE = 1;
14 |
15 | public static CursorLoader create(Context context, int id, Bundle bundle) {
16 | LocalFileLoader loader = null;
17 | switch (id) {
18 | case ALL_BOOK_FILE:
19 | loader = new LocalFileLoader(context);
20 | break;
21 | default:
22 | loader = null;
23 | break;
24 | }
25 | if (loader != null) {
26 | return loader;
27 | }
28 |
29 | throw new IllegalArgumentException("The id of Loader is invalid!");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/ActivitySource.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import androidx.appcompat.app.AppCompatActivity
6 |
7 | import java.lang.ref.WeakReference
8 |
9 | internal class ActivitySource(activity: AppCompatActivity) : RequestSource {
10 |
11 | private val actRef: WeakReference = WeakReference(activity)
12 |
13 | override val context: Context?
14 | get() = actRef.get()
15 |
16 | override fun startActivity(intent: Intent) {
17 | actRef.get()?.startActivity(intent)
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/FragmentSource.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import androidx.fragment.app.Fragment
6 |
7 | import java.lang.ref.WeakReference
8 |
9 | internal class FragmentSource(fragment: Fragment) : RequestSource {
10 |
11 | private val fragRef: WeakReference = WeakReference(fragment)
12 |
13 | override val context: Context?
14 | get() = fragRef.get()?.requireContext()
15 |
16 | override fun startActivity(intent: Intent) {
17 | fragRef.get()?.startActivity(intent)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/OnPermissionsDeniedCallback.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | interface OnPermissionsDeniedCallback {
4 | fun onPermissionsDenied(requestCode: Int, deniedPermissions: Array)
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/OnPermissionsGrantedCallback.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | interface OnPermissionsGrantedCallback {
4 |
5 | fun onPermissionsGranted(requestCode: Int)
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/OnPermissionsResultCallback.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | interface OnPermissionsResultCallback {
4 |
5 | fun onPermissionsGranted(requestCode: Int)
6 |
7 | fun onPermissionsDenied(requestCode: Int, deniedPermissions: Array)
8 |
9 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/OnRequestPermissionsResultCallback.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | import android.content.Intent
4 |
5 | interface OnRequestPermissionsResultCallback {
6 |
7 | fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray)
8 |
9 | fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?)
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/RequestPlugins.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | internal object RequestPlugins {
4 |
5 | @Volatile
6 | var sRequestCallback: OnRequestPermissionsResultCallback? = null
7 |
8 | @Volatile
9 | var sResultCallback: OnPermissionsResultCallback? = null
10 |
11 | fun setOnRequestPermissionsCallback(callback: OnRequestPermissionsResultCallback) {
12 | sRequestCallback = callback
13 | }
14 |
15 | fun setOnPermissionsResultCallback(callback: OnPermissionsResultCallback) {
16 | sResultCallback = callback
17 | }
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/help/permission/RequestSource.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.help.permission
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 |
6 | interface RequestSource {
7 |
8 | val context: Context?
9 |
10 | fun startActivity(intent: Intent)
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/model/SavedSource.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.model;
2 |
3 | import com.kunfei.bookshelf.bean.BookSourceBean;
4 |
5 | public class SavedSource {
6 | public static SavedSource Instance = new SavedSource();
7 |
8 | private String bookName;
9 | private long saveTime;
10 | private String sourceUrl;
11 |
12 | private SavedSource() {
13 | this.bookName = "";
14 | saveTime = 0;
15 | }
16 |
17 | public String getBookName() {
18 | return this.bookName;
19 | }
20 |
21 | public void setBookName(String bookName) {
22 | this.bookName = bookName;
23 | }
24 |
25 | public long getSaveTime() {
26 | return saveTime;
27 | }
28 |
29 | public void setSaveTime(long saveTime) {
30 | this.saveTime = saveTime;
31 | }
32 |
33 | public BookSourceBean getBookSource() {
34 | if (sourceUrl == null) {
35 | return null;
36 | }
37 | return BookSourceManager.getBookSourceByUrl(sourceUrl);
38 | }
39 |
40 | public void setBookSource(BookSourceBean bookSource) {
41 | if (bookSource != null) {
42 | this.sourceUrl = bookSource.getBookSourceUrl();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/model/content/VipThrowable.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.model.content;
2 |
3 | import com.kunfei.bookshelf.MApplication;
4 | import com.kunfei.bookshelf.R;
5 |
6 | public class VipThrowable extends Throwable {
7 |
8 | private final static String tag = "VIP_THROWABLE";
9 |
10 | VipThrowable() {
11 | super(MApplication.getInstance().getString(R.string.donate_s));
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/model/impl/IDownloadTask.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.model.impl;
2 |
3 | import com.kunfei.bookshelf.bean.DownloadBookBean;
4 | import com.kunfei.bookshelf.bean.DownloadChapterBean;
5 |
6 | import io.reactivex.Scheduler;
7 |
8 | public interface IDownloadTask {
9 |
10 | int getId();
11 |
12 | void startDownload(Scheduler scheduler);
13 |
14 | void stopDownload();
15 |
16 | boolean isDownloading();
17 |
18 | boolean isFinishing();
19 |
20 | DownloadBookBean getDownloadBook();
21 |
22 | void onDownloadPrepared(DownloadBookBean downloadBook);
23 |
24 | void onDownloadProgress(DownloadChapterBean chapterBean);
25 |
26 | void onDownloadChange(DownloadBookBean downloadBook);
27 |
28 | void onDownloadError(DownloadBookBean downloadBook);
29 |
30 | void onDownloadComplete(DownloadBookBean downloadBook);
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/model/impl/IHttpGetApi.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.model.impl;
2 |
3 | import java.util.Map;
4 |
5 | import io.reactivex.Observable;
6 | import retrofit2.Response;
7 | import retrofit2.http.GET;
8 | import retrofit2.http.HeaderMap;
9 | import retrofit2.http.QueryMap;
10 | import retrofit2.http.Url;
11 |
12 | /**
13 | * Created by GKF on 2018/1/21.
14 | * get web content
15 | */
16 |
17 | public interface IHttpGetApi {
18 | @GET
19 | Observable> get(@Url String url,
20 | @HeaderMap Map headers);
21 |
22 | @GET
23 | Observable> getMap(@Url String url,
24 | @QueryMap(encoded = true) Map queryMap,
25 | @HeaderMap Map headers);
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/model/impl/IHttpPostApi.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.model.impl;
2 |
3 | import java.util.Map;
4 |
5 | import io.reactivex.Observable;
6 | import okhttp3.RequestBody;
7 | import retrofit2.Response;
8 | import retrofit2.http.Body;
9 | import retrofit2.http.FieldMap;
10 | import retrofit2.http.FormUrlEncoded;
11 | import retrofit2.http.HeaderMap;
12 | import retrofit2.http.POST;
13 | import retrofit2.http.Url;
14 |
15 | /**
16 | * Created by GKF on 2018/1/29.
17 | * post
18 | */
19 |
20 | public interface IHttpPostApi {
21 |
22 | @FormUrlEncoded
23 | @POST
24 | Observable> postMap(@Url String url,
25 | @FieldMap(encoded = true) Map fieldMap,
26 | @HeaderMap Map headers);
27 |
28 | @POST
29 | Observable> postJson(@Url String url,
30 | @Body RequestBody body,
31 | @HeaderMap Map headers);
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/BookListContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import android.content.SharedPreferences;
4 |
5 | import com.kunfei.basemvplib.impl.IPresenter;
6 | import com.kunfei.basemvplib.impl.IView;
7 | import com.kunfei.bookshelf.bean.BookShelfBean;
8 |
9 | import java.util.List;
10 |
11 | public interface BookListContract {
12 |
13 | interface View extends IView {
14 |
15 | /**
16 | * 刷新书架书籍小说信息 更新UI
17 | *
18 | * @param bookShelfBeanList 书架
19 | */
20 | void refreshBookShelf(List bookShelfBeanList);
21 |
22 | void refreshBook(String noteUrl);
23 |
24 | /**
25 | * 刷新错误
26 | *
27 | * @param error 错误
28 | */
29 | void refreshError(String error);
30 |
31 | SharedPreferences getPreferences();
32 |
33 | /**
34 | * 更新Group
35 | */
36 | void updateGroup(Integer group);
37 |
38 | }
39 |
40 | interface Presenter extends IPresenter {
41 | void queryBookShelf(Boolean needRefresh, int group);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/BookSourceContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.google.android.material.snackbar.Snackbar;
4 | import com.kunfei.basemvplib.impl.IPresenter;
5 | import com.kunfei.basemvplib.impl.IView;
6 | import com.kunfei.bookshelf.bean.BookSourceBean;
7 |
8 | import java.util.List;
9 |
10 | public interface BookSourceContract {
11 |
12 | interface Presenter extends IPresenter {
13 |
14 | void saveData(BookSourceBean bookSourceBean);
15 |
16 | void saveData(List bookSourceBeans);
17 |
18 | void delData(BookSourceBean bookSourceBean);
19 |
20 | void delData(List bookSourceBeans);
21 |
22 | void importBookSource(String url);
23 |
24 | void importBookSourceLocal(String path);
25 |
26 | void checkBookSource(List sourceBeans);
27 |
28 | }
29 |
30 | interface View extends IView {
31 |
32 | void refreshBookSource();
33 |
34 | Snackbar getSnackBar(String msg, int length);
35 |
36 | void showSnackBar(String msg, int length);
37 |
38 | void setResult(int resultCode);
39 |
40 | int getSort();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/ChoiceBookContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.kunfei.basemvplib.impl.IPresenter;
4 | import com.kunfei.basemvplib.impl.IView;
5 | import com.kunfei.bookshelf.bean.SearchBookBean;
6 |
7 | import java.util.List;
8 |
9 | public interface ChoiceBookContract {
10 | interface Presenter extends IPresenter {
11 |
12 | int getPage();
13 |
14 | void initPage();
15 |
16 | void toSearchBooks(String key);
17 |
18 | String getTitle();
19 | }
20 |
21 | interface View extends IView {
22 |
23 | void refreshSearchBook(List books);
24 |
25 | void loadMoreSearchBook(List books);
26 |
27 | void refreshFinish(Boolean isAll);
28 |
29 | void loadMoreFinish(Boolean isAll);
30 |
31 | void searchBookError(String msg);
32 |
33 | void addBookShelfFailed(String massage);
34 |
35 | void startRefreshAnim();
36 | }
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/FindBookContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.kunfei.basemvplib.impl.IPresenter;
4 | import com.kunfei.basemvplib.impl.IView;
5 | import com.kunfei.bookshelf.widget.recycler.expandable.bean.RecyclerViewData;
6 |
7 | import java.util.List;
8 |
9 | public interface FindBookContract {
10 | interface Presenter extends IPresenter {
11 |
12 | void initData();
13 |
14 | }
15 |
16 | interface View extends IView {
17 |
18 | void upData(List group);
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/ImportBookContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.kunfei.basemvplib.impl.IPresenter;
4 | import com.kunfei.basemvplib.impl.IView;
5 |
6 | import java.io.File;
7 | import java.util.List;
8 |
9 | public interface ImportBookContract {
10 |
11 | interface Presenter extends IPresenter {
12 |
13 | void importBooks(List books);
14 |
15 | }
16 |
17 | interface View extends IView {
18 |
19 | /**
20 | * 添加成功
21 | */
22 | void addSuccess();
23 |
24 | /**
25 | * 添加失败
26 | */
27 | void addError(String msg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/MainContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.kunfei.basemvplib.impl.IPresenter;
4 | import com.kunfei.basemvplib.impl.IView;
5 |
6 | public interface MainContract {
7 |
8 | interface View extends IView {
9 |
10 | void initImmersionBar();
11 |
12 | /**
13 | * 取消弹出框
14 | */
15 | void dismissHUD();
16 |
17 | /**
18 | * 恢复数据
19 | */
20 | void onRestore(String msg);
21 |
22 | void recreate();
23 |
24 | void toast(String msg);
25 |
26 | void toast(int strId);
27 |
28 | int getGroup();
29 | }
30 |
31 | interface Presenter extends IPresenter {
32 |
33 | void backupData();
34 |
35 | void restoreData();
36 |
37 | void addBookUrl(String bookUrl);
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/ReplaceRuleContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 |
4 | import com.google.android.material.snackbar.Snackbar;
5 | import com.kunfei.basemvplib.impl.IPresenter;
6 | import com.kunfei.basemvplib.impl.IView;
7 | import com.kunfei.bookshelf.bean.ReplaceRuleBean;
8 |
9 | import java.util.List;
10 |
11 | public interface ReplaceRuleContract {
12 | interface Presenter extends IPresenter {
13 |
14 | void saveData(List replaceRuleBeans);
15 |
16 | void delData(ReplaceRuleBean replaceRuleBean);
17 |
18 | void delData(List replaceRuleBeans);
19 |
20 | void importDataSLocal(String uri);
21 |
22 | void importDataS(String text);
23 | }
24 |
25 | interface View extends IView {
26 |
27 | void refresh();
28 |
29 | Snackbar getSnackBar(String msg, int length);
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/SourceEditContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.kunfei.basemvplib.impl.IPresenter;
4 | import com.kunfei.basemvplib.impl.IView;
5 | import com.kunfei.bookshelf.bean.BookSourceBean;
6 |
7 | import io.reactivex.Observable;
8 |
9 | public interface SourceEditContract {
10 | interface Presenter extends IPresenter {
11 |
12 | Observable saveSource(BookSourceBean bookSource, BookSourceBean bookSourceOld);
13 |
14 | void copySource(String bookSource);
15 |
16 | void pasteSource();
17 |
18 | void setText(String bookSourceStr);
19 | }
20 |
21 | interface View extends IView {
22 |
23 | void setText(BookSourceBean bookSourceBean);
24 |
25 | String getBookSourceStr(boolean hasFind);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/presenter/contract/TxtChapterRuleContract.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.presenter.contract;
2 |
3 | import com.google.android.material.snackbar.Snackbar;
4 | import com.kunfei.basemvplib.impl.IPresenter;
5 | import com.kunfei.basemvplib.impl.IView;
6 | import com.kunfei.bookshelf.bean.TxtChapterRuleBean;
7 |
8 | import java.util.List;
9 |
10 | public interface TxtChapterRuleContract {
11 | interface Presenter extends IPresenter {
12 |
13 | void saveData(List txtChapterRuleBeans);
14 |
15 | void delData(TxtChapterRuleBean txtChapterRuleBean);
16 |
17 | void delData(List txtChapterRuleBeans);
18 |
19 | void importDataSLocal(String uri);
20 |
21 | void importDataS(String text);
22 | }
23 |
24 | interface View extends IView {
25 |
26 | void refresh();
27 |
28 | Snackbar getSnackBar(String msg, int length);
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/BatteryUtil.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.content.IntentFilter;
6 | import android.os.BatteryManager;
7 |
8 | public class BatteryUtil {
9 |
10 | public static int getLevel(Context context) {
11 | IntentFilter iFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
12 | Intent batteryStatus = context.registerReceiver(null, iFilter);
13 |
14 | return batteryStatus != null ? batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) : -1;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/DrawableUtil.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils;
2 |
3 | import android.graphics.drawable.ColorDrawable;
4 | import android.graphics.drawable.Drawable;
5 | import android.graphics.drawable.TransitionDrawable;
6 |
7 | import androidx.annotation.ColorInt;
8 |
9 | /**
10 | * @author Karim Abou Zeid (kabouzeid)
11 | */
12 | public final class DrawableUtil {
13 |
14 | public static TransitionDrawable createTransitionDrawable(@ColorInt int startColor, @ColorInt int endColor) {
15 | return createTransitionDrawable(new ColorDrawable(startColor), new ColorDrawable(endColor));
16 | }
17 |
18 | public static TransitionDrawable createTransitionDrawable(Drawable start, Drawable end) {
19 | final Drawable[] drawables = new Drawable[2];
20 |
21 | drawables[0] = start;
22 | drawables[1] = end;
23 |
24 | return new TransitionDrawable(drawables);
25 | }
26 |
27 | private DrawableUtil() {
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/IOUtils.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils;
2 |
3 | import java.io.Closeable;
4 | import java.io.IOException;
5 | import java.io.InputStream;
6 | import java.util.Scanner;
7 |
8 | /**
9 | * Created by newbiechen on 17-5-11.
10 | */
11 |
12 | public class IOUtils {
13 |
14 | public static void close(Closeable closeable) {
15 | if (closeable == null) return;
16 | try {
17 | closeable.close();
18 | } catch (IOException e) {
19 | e.printStackTrace();
20 | }
21 | }
22 |
23 | public static String toString(InputStream inputStream) {
24 | Scanner s = new Scanner(inputStream).useDelimiter("\\A");
25 | return s.hasNext() ? s.next() : "";
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/ListUtil.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class ListUtil {
7 |
8 | public static List filter(List list, ListLook hook) {
9 | ArrayList r = new ArrayList<>();
10 | for (T t : list) {
11 | if (hook.test(t)) {
12 | r.add(t);
13 | }
14 | }
15 | r.trimToSize();
16 | return r;
17 | }
18 |
19 | public interface ListLook {
20 | boolean test(T t);
21 | }
22 |
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/ReadAssets.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils;
2 |
3 | import android.content.Context;
4 |
5 | import java.io.IOException;
6 | import java.io.InputStream;
7 | import java.nio.charset.StandardCharsets;
8 |
9 | public class ReadAssets {
10 |
11 | @SuppressWarnings("ResultOfMethodCallIgnored")
12 | public static String getText(Context context, String fileName) {
13 | try {
14 | //Return an AssetManager instance for your application's package
15 | InputStream is = context.getAssets().open(fileName);
16 | int size = is.available();
17 | // Read the entire asset into a local byte buffer.
18 | byte[] buffer = new byte[size];
19 | is.read(buffer);
20 | is.close();
21 | // Convert the buffer into a string.
22 | // Finally stick the string into the text view.
23 | return new String(buffer, StandardCharsets.UTF_8);
24 | } catch (IOException e) {
25 | // Should never happen!
26 | e.printStackTrace();
27 | }
28 | return "读取错误,请检查文件名";
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/bar/BarHide.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.bar;
2 |
3 | /**
4 | * Created by geyifeng on 2017/4/25.
5 | */
6 |
7 | public enum BarHide {
8 | FLAG_HIDE_STATUS_BAR, //隐藏状态栏
9 | FLAG_HIDE_NAVIGATION_BAR, //隐藏导航栏
10 | FLAG_HIDE_BAR, //隐藏状态栏和导航栏
11 | FLAG_SHOW_BAR //显示状态栏和导航栏
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/bar/OnKeyboardListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.bar;
2 |
3 | /**
4 | * 软键盘监听
5 | * Created by geyifeng on 2017/8/28.
6 | */
7 | public interface OnKeyboardListener {
8 | /**
9 | * On keyboard change.
10 | *
11 | * @param isPopup the is popup 是否弹出
12 | * @param keyboardHeight the keyboard height 软键盘高度
13 | */
14 | void onKeyboardChange(boolean isPopup, int keyboardHeight);
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/download/JsDownloadInterceptor.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.download;
2 |
3 | import java.io.IOException;
4 |
5 | import okhttp3.Interceptor;
6 | import okhttp3.Response;
7 |
8 | public class JsDownloadInterceptor implements Interceptor {
9 | private JsDownloadListener downloadListener;
10 |
11 | public JsDownloadInterceptor(JsDownloadListener downloadListener) {
12 | this.downloadListener = downloadListener;
13 | }
14 |
15 | @Override
16 | public Response intercept(Chain chain) throws IOException {
17 | Response response = chain.proceed(chain.request());
18 | return response.newBuilder().body(
19 | new JsResponseBody(response.body(), downloadListener)).build();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/download/JsDownloadListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.download;
2 |
3 | public interface JsDownloadListener {
4 | void onStartDownload(long length);
5 |
6 | void onProgress(int progress);
7 |
8 | void onFail(String errorInfo);
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/download/Service.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.download;
2 |
3 | import io.reactivex.Observable;
4 | import okhttp3.ResponseBody;
5 | import retrofit2.http.GET;
6 | import retrofit2.http.Streaming;
7 | import retrofit2.http.Url;
8 |
9 | public interface Service {
10 | @Streaming
11 | @GET
12 | Observable download(@Url String url);
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/theme/ATHUtil.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.theme;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 |
6 | import androidx.annotation.AttrRes;
7 |
8 | import com.kunfei.bookshelf.utils.ColorUtil;
9 |
10 | /**
11 | * @author Aidan Follestad (afollestad)
12 | */
13 | public final class ATHUtil {
14 |
15 | public static boolean isWindowBackgroundDark(Context context) {
16 | return !ColorUtil.isColorLight(ATHUtil.resolveColor(context, android.R.attr.windowBackground));
17 | }
18 |
19 | public static int resolveColor(Context context, @AttrRes int attr) {
20 | return resolveColor(context, attr, 0);
21 | }
22 |
23 | public static int resolveColor(Context context, @AttrRes int attr, int fallback) {
24 | TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
25 | try {
26 | return a.getColor(0, fallback);
27 | } finally {
28 | a.recycle();
29 | }
30 | }
31 |
32 | private ATHUtil() {
33 | }
34 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/web_dav/http/Handler.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.web_dav.http;
2 |
3 | import java.net.URL;
4 | import java.net.URLConnection;
5 | import java.net.URLStreamHandler;
6 |
7 | public class Handler extends URLStreamHandler {
8 |
9 | public static final URLStreamHandler HANDLER = new Handler();
10 |
11 | protected int getDefaultPort() {
12 | return 80;
13 | }
14 |
15 | public URLConnection openConnection(URL u) {
16 | return null;
17 | }
18 |
19 | @Override
20 | protected void parseURL(URL url, String spec, int start, int end) {
21 | super.parseURL(url, spec, start, end);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/web_dav/http/HttpAuth.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.web_dav.http;
2 |
3 | public class HttpAuth {
4 |
5 | private static Auth auth;
6 |
7 | private HttpAuth() {
8 | }
9 |
10 | public static void setAuth(String user, String password) {
11 | auth = new Auth(user, password);
12 | }
13 |
14 | public static Auth getAuth() {
15 | return auth;
16 | }
17 |
18 | public static class Auth {
19 | private String user;
20 | private String pass;
21 |
22 | Auth(String user, String pass) {
23 | this.user = user;
24 | this.pass = pass;
25 | }
26 |
27 | public String getUser() {
28 | return user;
29 | }
30 |
31 | public String getPass() {
32 | return pass;
33 | }
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/utils/web_dav/http/OkHttp.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.utils.web_dav.http;
2 |
3 | import okhttp3.OkHttpClient;
4 |
5 | public class OkHttp {
6 |
7 | private OkHttpClient okHttpClient;
8 |
9 | private OkHttp() {
10 | }
11 |
12 | public static OkHttp getInstance() {
13 | return SingletonHelper.INSTANCE;
14 | }
15 |
16 | public OkHttpClient client() {
17 | if (okHttpClient == null) {
18 | okHttpClient = new OkHttpClient.Builder().build();
19 | }
20 | return okHttpClient;
21 | }
22 |
23 | private static class SingletonHelper {
24 | private final static OkHttp INSTANCE = new OkHttp();
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/view/adapter/BookShelfAdapter.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.view.adapter;
2 |
3 | import com.kunfei.bookshelf.bean.BookShelfBean;
4 | import com.kunfei.bookshelf.help.ItemTouchCallback;
5 | import com.kunfei.bookshelf.view.adapter.base.OnItemClickListenerTwo;
6 |
7 | import java.util.HashSet;
8 | import java.util.List;
9 |
10 | public interface BookShelfAdapter {
11 |
12 | void setArrange(boolean isArrange);
13 |
14 | void selectAll();
15 |
16 | ItemTouchCallback.OnItemTouchCallbackListener getItemTouchCallbackListener();
17 |
18 | List getBooks();
19 |
20 | void replaceAll(List newDataS, String bookshelfPx);
21 |
22 | void refreshBook(String noteUrl);
23 |
24 | void setItemClickListener(OnItemClickListenerTwo itemClickListener);
25 |
26 | HashSet getSelected();
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/view/adapter/base/BaseViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.view.adapter.base;
2 |
3 | import android.view.View;
4 |
5 | import androidx.recyclerview.widget.RecyclerView;
6 |
7 | /**
8 | * Created by newbiechen on 17-5-17.
9 | */
10 |
11 | public class BaseViewHolder extends RecyclerView.ViewHolder {
12 | public IViewHolder holder;
13 |
14 | public BaseViewHolder(View itemView, IViewHolder holder) {
15 | super(itemView);
16 | this.holder = holder;
17 | holder.initView();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/view/adapter/base/IViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.view.adapter.base;
2 |
3 | import android.view.View;
4 | import android.view.ViewGroup;
5 |
6 | /**
7 | * Created by newbiechen on 17-5-17.
8 | */
9 |
10 | public interface IViewHolder {
11 | View createItemView(ViewGroup parent);
12 |
13 | void initView();
14 |
15 | void onBind(T data, int pos);
16 |
17 | void onClick();
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/view/adapter/base/OnItemClickListenerTwo.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.view.adapter.base;
2 |
3 | import android.view.View;
4 |
5 | public interface OnItemClickListenerTwo {
6 | void onClick(View view, int index);
7 |
8 | void onLongClick(View view, int index);
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/view/adapter/base/ViewHolderImpl.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.view.adapter.base;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | /**
9 | * Created by newbiechen on 17-5-17.
10 | */
11 |
12 | public abstract class ViewHolderImpl implements IViewHolder {
13 | private View view;
14 | private Context context;
15 |
16 | /****************************************************/
17 | protected abstract int getItemLayoutId();
18 |
19 |
20 | @Override
21 | public View createItemView(ViewGroup parent) {
22 | view = LayoutInflater.from(parent.getContext())
23 | .inflate(getItemLayoutId(), parent, false);
24 | context = parent.getContext();
25 | return view;
26 | }
27 |
28 | protected V findById(int id) {
29 | return (V) view.findViewById(id);
30 | }
31 |
32 | protected Context getContext() {
33 | return context;
34 | }
35 |
36 | protected View getItemView() {
37 | return view;
38 | }
39 |
40 | @Override
41 | public void onClick() {
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/web/ShareServer.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.web;
2 |
3 | import com.google.gson.Gson;
4 | import com.kunfei.bookshelf.bean.BookSourceBean;
5 |
6 | import java.util.List;
7 |
8 | import fi.iki.elonen.NanoHTTPD;
9 |
10 | public class ShareServer extends NanoHTTPD {
11 |
12 | private Callback callback;
13 |
14 | public ShareServer(int port, Callback callback) {
15 | super(port);
16 | this.callback = callback;
17 | }
18 |
19 | @Override
20 | public Response serve(IHTTPSession session) {
21 | return newFixedLengthResponse(new Gson().toJson(callback.getSources()));
22 | }
23 |
24 | public interface Callback {
25 | List getSources();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/web/WebSocketServer.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.web;
2 |
3 | import com.kunfei.bookshelf.web.controller.SourceDebugWebSocket;
4 |
5 | import fi.iki.elonen.NanoWSD;
6 |
7 | public class WebSocketServer extends NanoWSD {
8 |
9 | public WebSocketServer(int port) {
10 | super(port);
11 | }
12 |
13 | @Override
14 | protected WebSocket openWebSocket(IHTTPSession handshake) {
15 | if (handshake.getUri().equals("/sourceDebug")) {
16 | return new SourceDebugWebSocket(handshake);
17 | }
18 | return null;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/explosion_field/OnAnimatorListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.explosion_field;
2 |
3 | import android.animation.Animator;
4 | import android.view.View;
5 |
6 | public interface OnAnimatorListener {
7 | void onAnimationEnd(Animator animator, View view);
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/filepicker/drawable/StateBaseDrawable.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.filepicker.drawable;
2 |
3 | import android.graphics.Color;
4 | import android.graphics.drawable.ColorDrawable;
5 | import android.graphics.drawable.Drawable;
6 | import android.graphics.drawable.StateListDrawable;
7 |
8 | /**
9 | * 按下状态与普通状态下显示不同的图片或颜色
10 | *
11 | * Author:李玉江[QQ:1032694760]
12 | * DateTime:2017/01/01 05:30
13 | * Builder:Android Studio
14 | */
15 | public abstract class StateBaseDrawable extends StateListDrawable {
16 |
17 | protected void addState(Drawable pressed) {
18 | addState(new ColorDrawable(Color.TRANSPARENT), pressed);
19 | }
20 |
21 | protected void addState(Drawable normal, Drawable pressed) {
22 | addState(new int[]{android.R.attr.state_pressed, android.R.attr.state_enabled}, pressed);
23 | addState(new int[]{android.R.attr.state_enabled, android.R.attr.state_focused}, pressed);
24 | addState(new int[]{android.R.attr.state_enabled}, normal);
25 | addState(new int[]{android.R.attr.state_focused}, pressed);
26 | addState(new int[]{android.R.attr.state_window_focused}, normal);
27 | addState(new int[]{}, normal);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/filepicker/drawable/StateColorDrawable.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.filepicker.drawable;
2 |
3 | import android.graphics.Color;
4 | import android.graphics.drawable.ColorDrawable;
5 |
6 | import androidx.annotation.ColorInt;
7 |
8 | /**
9 | * 按下状态与普通状态下显示不同的颜色
10 | *
11 | * Author:李玉江[QQ:1032694760]
12 | * DateTime:2017/01/01 05:30
13 | * Builder:Android Studio
14 | */
15 | public class StateColorDrawable extends StateBaseDrawable {
16 |
17 | public StateColorDrawable(@ColorInt int pressedColor) {
18 | this(Color.TRANSPARENT, pressedColor);
19 | }
20 |
21 | public StateColorDrawable(@ColorInt int normalColor, @ColorInt int pressedColor) {
22 | addState(new ColorDrawable(normalColor), new ColorDrawable(pressedColor));
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/modialog/BaseDialog.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.modialog;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.view.View;
6 | import android.widget.TextView;
7 |
8 | import androidx.annotation.NonNull;
9 | import androidx.annotation.Nullable;
10 |
11 | import com.kunfei.bookshelf.utils.SoftInputUtil;
12 |
13 | public class BaseDialog extends Dialog {
14 | public BaseDialog(@NonNull Context context) {
15 | super(context);
16 | }
17 |
18 | public BaseDialog(@NonNull Context context, int themeResId) {
19 | super(context, themeResId);
20 | }
21 |
22 | protected BaseDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
23 | super(context, cancelable, cancelListener);
24 | }
25 |
26 | @Override
27 | public void dismiss() {
28 | View view = getCurrentFocus();
29 | if (view instanceof TextView) {
30 | SoftInputUtil.hideIMM(view);
31 | }
32 | super.dismiss();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/page/TxtChar.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.page
2 |
3 | import android.graphics.Point
4 |
5 |
6 | class TxtChar {
7 | var chardata: Char = ' '//字符数据
8 |
9 | var selected: Boolean? = false//当前字符是否被选中
10 |
11 | //记录文字的左上右上左下右下四个点坐标
12 | var topLeftPosition: Point? = null//左上
13 | var topRightPosition: Point? = null//右上
14 | var bottomLeftPosition: Point? = null//左下
15 | var bottomRightPosition: Point? = null//右下
16 |
17 | var charWidth = 0f//字符宽度
18 | var Index = 0//当前字符位置
19 |
20 | override fun toString(): String {
21 | return ("ShowChar [chardata=" + chardata + ", Selected=" + selected + ", TopLeftPosition=" + topLeftPosition
22 | + ", TopRightPosition=" + topRightPosition + ", BottomLeftPosition=" + bottomLeftPosition
23 | + ", BottomRightPosition=" + bottomRightPosition + ", charWidth=" + charWidth + ", Index=" + Index
24 | + "]");
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/page/TxtLine.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.page
2 |
3 | class TxtLine {
4 |
5 | var charsData: List? = null
6 |
7 | fun getLineData(): String {
8 | var linedata = ""
9 | if (charsData == null) return linedata
10 | charsData?.let {
11 | if (it.isEmpty()) return linedata
12 | for (c in it) {
13 | linedata += c.chardata
14 | }
15 | }
16 | return linedata
17 | }
18 |
19 | override fun toString(): String {
20 | return "ShowLine [Linedata=" + getLineData() + "]"
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/page/TxtPage.kt:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.page
2 |
3 | import java.util.*
4 |
5 | /**
6 | * 页面
7 | */
8 |
9 | class TxtPage(val position: Int) {
10 | var title: String? = null
11 | var titleLines: Int = 0 //当前 lines 中为 title 的行数。
12 | private val lines = ArrayList()
13 | //存放每个字的位置
14 | var txtLists: List? = null
15 |
16 | val content: String
17 | get() {
18 | val s = StringBuilder()
19 | for (i in lines.indices) {
20 | s.append(lines[i])
21 | }
22 | return s.toString()
23 | }
24 |
25 | fun addLine(line: String) {
26 | lines.add(line)
27 | }
28 |
29 | fun addLines(lines: List) {
30 | this.lines.addAll(lines)
31 | }
32 |
33 | fun getLine(i: Int): String {
34 | return lines[i]
35 | }
36 |
37 | fun getLines(): List {
38 | return lines
39 | }
40 |
41 | fun size(): Int {
42 | return lines.size
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/page/animation/NonePageAnim.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.page.animation;
2 |
3 | import android.graphics.Canvas;
4 | import android.view.View;
5 |
6 | /**
7 | * 无动画翻页
8 | */
9 |
10 | public class NonePageAnim extends HorizonPageAnim {
11 |
12 | public NonePageAnim(int w, int h, View view, OnPageChangeListener listener) {
13 | super(w, h, view, listener);
14 | }
15 |
16 | @Override
17 | public void drawMove(Canvas canvas) {
18 | canvas.drawBitmap(bitmapList.get(1), 0, 0, null);
19 | }
20 |
21 | @Override
22 | public void startAnim() {
23 | super.startAnim();
24 | isRunning = false;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/recycler/expandable/bean/BaseItem.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.recycler.expandable.bean;
2 |
3 | /**
4 | * author:Drawthink
5 | * describe:
6 | * date: 2017/5/22
7 | */
8 |
9 | public abstract class BaseItem {
10 |
11 | public abstract boolean isParent();
12 |
13 | // public abstract boolean isExpand();
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/recycler/refresh/BaseRefreshListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.recycler.refresh;
2 |
3 | public interface BaseRefreshListener {
4 |
5 | public void startRefresh();
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/recycler/refresh/OnLoadMoreListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.recycler.refresh;
2 |
3 | public interface OnLoadMoreListener {
4 |
5 | public void startLoadMore();
6 |
7 | public void loadMoreErrorTryAgain();
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/recycler/refresh/OnRefreshWithProgressListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.recycler.refresh;
2 |
3 | public interface OnRefreshWithProgressListener extends BaseRefreshListener {
4 |
5 | public int getMaxProgress();
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/recycler/scroller/FastScrollStateChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.recycler.scroller;
2 |
3 | public interface FastScrollStateChangeListener {
4 |
5 | /**
6 | * Called when fast scrolling begins
7 | */
8 | void onFastScrollStart(FastScroller fastScroller);
9 |
10 | /**
11 | * Called when fast scrolling ends
12 | */
13 | void onFastScrollStop(FastScroller fastScroller);
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATECheckBox.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.appcompat.widget.AppCompatCheckBox;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ATH;
9 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
10 |
11 | /**
12 | * @author Aidan Follestad (afollestad)
13 | */
14 | public class ATECheckBox extends AppCompatCheckBox {
15 |
16 | public ATECheckBox(Context context) {
17 | super(context);
18 | init(context, null);
19 | }
20 |
21 | public ATECheckBox(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | init(context, attrs);
24 | }
25 |
26 | public ATECheckBox(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | init(context, attrs);
29 | }
30 |
31 | private void init(Context context, AttributeSet attrs) {
32 | ATH.setTint(this, ThemeStore.accentColor(context));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATEEditText.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.appcompat.widget.AppCompatEditText;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ATH;
9 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
10 |
11 | /**
12 | * @author Aidan Follestad (afollestad)
13 | */
14 | public class ATEEditText extends AppCompatEditText {
15 |
16 | public ATEEditText(Context context) {
17 | super(context);
18 | init(context, null);
19 | }
20 |
21 | public ATEEditText(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | init(context, attrs);
24 | }
25 |
26 | public ATEEditText(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | init(context, attrs);
29 | }
30 |
31 | private void init(Context context, AttributeSet attrs) {
32 | ATH.setTint(this, ThemeStore.accentColor(context));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATEPrimaryTextView.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.appcompat.widget.AppCompatTextView;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
9 |
10 | /**
11 | * @author Aidan Follestad (afollestad)
12 | */
13 | public class ATEPrimaryTextView extends AppCompatTextView {
14 |
15 | public ATEPrimaryTextView(Context context) {
16 | super(context);
17 | init(context, null);
18 | }
19 |
20 | public ATEPrimaryTextView(Context context, AttributeSet attrs) {
21 | super(context, attrs);
22 | init(context, attrs);
23 | }
24 |
25 | public ATEPrimaryTextView(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | init(context, attrs);
28 | }
29 |
30 | private void init(Context context, AttributeSet attrs) {
31 | setTextColor(ThemeStore.textColorPrimary(context));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATERadioButton.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.appcompat.widget.AppCompatRadioButton;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ATH;
9 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
10 |
11 | /**
12 | * @author Aidan Follestad (afollestad)
13 | */
14 | public class ATERadioButton extends AppCompatRadioButton {
15 |
16 | public ATERadioButton(Context context) {
17 | super(context);
18 | init(context, null);
19 | }
20 |
21 | public ATERadioButton(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | init(context, attrs);
24 | }
25 |
26 | public ATERadioButton(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | init(context, attrs);
29 | }
30 |
31 | private void init(Context context, AttributeSet attrs) {
32 | ATH.setTint(this, ThemeStore.accentColor(context));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATESecondaryTextView.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.appcompat.widget.AppCompatTextView;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
9 |
10 | /**
11 | * @author Aidan Follestad (afollestad)
12 | */
13 | public class ATESecondaryTextView extends AppCompatTextView {
14 |
15 | public ATESecondaryTextView(Context context) {
16 | super(context);
17 | init(context, null);
18 | }
19 |
20 | public ATESecondaryTextView(Context context, AttributeSet attrs) {
21 | super(context, attrs);
22 | init(context, attrs);
23 | }
24 |
25 | public ATESecondaryTextView(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | init(context, attrs);
28 | }
29 |
30 | private void init(Context context, AttributeSet attrs) {
31 | setTextColor(ThemeStore.textColorSecondary(context));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATESeekBar.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import androidx.appcompat.widget.AppCompatSeekBar;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ATH;
9 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
10 |
11 | /**
12 | * @author Aidan Follestad (afollestad)
13 | */
14 | public class ATESeekBar extends AppCompatSeekBar {
15 |
16 | public ATESeekBar(Context context) {
17 | super(context);
18 | init(context, null);
19 | }
20 |
21 | public ATESeekBar(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | init(context, attrs);
24 | }
25 |
26 | public ATESeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | init(context, attrs);
29 | }
30 |
31 | private void init(Context context, AttributeSet attrs) {
32 | ATH.setTint(this, ThemeStore.accentColor(context));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATEStockSwitch.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.View;
6 | import android.widget.Switch;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ATH;
9 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
10 |
11 | /**
12 | * @author Aidan Follestad (afollestad)
13 | */
14 | public class ATEStockSwitch extends Switch {
15 |
16 | public ATEStockSwitch(Context context) {
17 | super(context);
18 | init(context, null);
19 | }
20 |
21 | public ATEStockSwitch(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | init(context, attrs);
24 | }
25 |
26 | public ATEStockSwitch(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | init(context, attrs);
29 | }
30 |
31 | private void init(Context context, AttributeSet attrs) {
32 | ATH.setTint(this, ThemeStore.accentColor(context));
33 | }
34 |
35 | @Override
36 | public boolean isShown() {
37 | return getParent() != null && getVisibility() == View.VISIBLE;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/kunfei/bookshelf/widget/views/ATESwitch.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf.widget.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.View;
6 | import android.widget.Switch;
7 |
8 | import com.kunfei.bookshelf.utils.theme.ATH;
9 | import com.kunfei.bookshelf.utils.theme.ThemeStore;
10 |
11 | /**
12 | * @author Aidan Follestad (afollestad)
13 | */
14 | public class ATESwitch extends Switch {
15 |
16 | public ATESwitch(Context context) {
17 | super(context);
18 | init(context, null);
19 | }
20 |
21 | public ATESwitch(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | init(context, attrs);
24 | }
25 |
26 | public ATESwitch(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | init(context, attrs);
29 | }
30 |
31 | private void init(Context context, AttributeSet attrs) {
32 | ATH.setTint(this, ThemeStore.accentColor(context));
33 | }
34 |
35 | @Override
36 | public boolean isShown() {
37 | return getParent() != null && getVisibility() == View.VISIBLE;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_none.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_readbook_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_readbook_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_readbook_top_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/anim_readbook_top_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_in_bottom_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_in_top_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_out_bottom_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/moprogress_out_top_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/color/selector_menu_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/bg_ib_pre.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/bg_ib_pre_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_chapter_item_divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_ib_pre.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_ib_pre_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_shadow_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/bg_shadow_bottom.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_shadow_bottom_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/bg_shadow_bottom_night.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_shadow_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/bg_shadow_top.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_shadow_top_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/bg_shadow_top_night.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_textfield_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fastscroll_handle.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fastscroll_track.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_add.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_drop_down.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_drop_up.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_author.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_auto_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_auto_page_stop.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_back_last.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_book_last.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_book_source_manage.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_bookmark.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_brightness.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_bug_report_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_cancel.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chapter_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check_source.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_copy.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_cursor_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_cursor_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_disclaimer.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_download.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_download_line.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_exchange.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_expand_less_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_expand_more_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_faq.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_find_replace.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_folder.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_format_line_spacing.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_history.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_last_read.xml:
--------------------------------------------------------------------------------
1 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launch.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_mail.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_more_vert.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_network_check.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_pause_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_pause_outline_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_play_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_play_outline_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_read_aloud.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_read_book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/ic_read_book.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_refresh_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_refresh_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_remove.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_save.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_scoring.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_skip_next.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_skip_previous.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_stop_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_swap_outline_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
17 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_top_source.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_translate.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_update.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_version.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_view_quilt.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
16 |
21 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_volume_up.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_web_outline.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_web_service_noti.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/icon_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img_cover_default.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/img_cover_default.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img_cover_gs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/img_cover_gs.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/searchview_line.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_common_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_fillet_btn_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_tv_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shadow_grid.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/drawable/shadow_grid.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_card_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_fillet_btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_fillet_btn_press.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_pop_checkaddshelf_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_radius_1dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_space_divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_text_cursor.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_welcome.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_number_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_bookmark_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_local_book.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_1line_text_and_del.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_change_cover.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
21 |
22 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_file_filepicker.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_find1_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_find1_kind.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_find2_childer_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_find2_header_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_find_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_font.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_path_filepicker.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_read_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_search_history.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_source_debug.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_source_edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/mo_dialog_markdown.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
16 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/mo_dialog_text_large.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/popup_keyboard_tool.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tab_view_icon_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_net_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_night_theme.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_recycler_font.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_refresh_load_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_refresh_no_data.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_refresh_recycler.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_book_download.xml:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_book_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_book_search_activity.xml:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_debug_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_qr_code_scan.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_read_style_activity.xml:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_search_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_source_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_update_activity.xml:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/book_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/book_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/book_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-hdpi/book_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/book_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-hdpi/book_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/book_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-hdpi/book_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/book_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-mdpi/book_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/book_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-mdpi/book_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/book_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-mdpi/book_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/book_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xhdpi/book_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/book_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xhdpi/book_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/book_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xhdpi/book_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/book_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxhdpi/book_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/book_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxhdpi/book_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/book_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxhdpi/book_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/book_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxxhdpi/book_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/book_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxxhdpi/book_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/book_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxxhdpi/book_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/silent_sound.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/app/src/main/res/raw/silent_sound.mp3
--------------------------------------------------------------------------------
/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
13 |
14 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v27/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v28/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/book_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F9F9F9
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4f4f4f
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.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 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/pref_settings_web_dav.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
22 |
23 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/test/java/com/kunfei/bookshelf/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.bookshelf;
2 |
3 | import org.junit.Test;
4 | import static org.junit.Assert.*;
5 |
6 | /**
7 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
8 | */
9 | public class ExampleUnitTest {
10 | @Test
11 | public void addition_isCorrect() throws Exception {
12 | assertEquals(4, 2 + 2);
13 | }
14 | }
--------------------------------------------------------------------------------
/basemvplib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/basemvplib/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\CodeTool\Android\Android_SDK/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 | -optimizationpasses 5
19 | -dontskipnonpubliclibraryclassmembers
20 | -dontusemixedcaseclassnames
21 | -classobfuscationdictionary obfuscationClassNames.txt
22 | -dontskipnonpubliclibraryclasses
23 | -verbose
24 |
25 | ##################OKGO########################
26 | #okgo
27 | -dontwarn com.lzy.okgo.**
28 | -keep class com.lzy.okgo.**{*;}
29 |
30 | #okrx
31 | -dontwarn com.lzy.okrx.**
32 | -keep class com.lzy.okrx.**{*;}
33 |
34 | #okserver
35 | -dontwarn com.lzy.okserver.**
36 | -keep class com.lzy.okserver.**{*;}
--------------------------------------------------------------------------------
/basemvplib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/basemvplib/src/main/java/com/kunfei/basemvplib/BasePresenterImpl.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.basemvplib;
2 |
3 | import com.kunfei.basemvplib.impl.IPresenter;
4 | import com.kunfei.basemvplib.impl.IView;
5 |
6 | import androidx.annotation.NonNull;
7 |
8 | public abstract class BasePresenterImpl implements IPresenter {
9 | protected T mView;
10 |
11 | @Override
12 | public void attachView(@NonNull IView iView) {
13 | mView = (T) iView;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/basemvplib/src/main/java/com/kunfei/basemvplib/BitIntentDataManager.java:
--------------------------------------------------------------------------------
1 | //Copyright (c) 2017. 章钦豪. All rights reserved.
2 | package com.kunfei.basemvplib;
3 |
4 | import java.util.HashMap;
5 | import java.util.Map;
6 |
7 | public class BitIntentDataManager {
8 | private static Map bigData;
9 |
10 | private static BitIntentDataManager instance = null;
11 |
12 | private BitIntentDataManager() {
13 | bigData = new HashMap<>();
14 | }
15 |
16 | public static BitIntentDataManager getInstance() {
17 | if (instance == null) {
18 | synchronized (BitIntentDataManager.class) {
19 | if (instance == null) {
20 | instance = new BitIntentDataManager();
21 | }
22 | }
23 | }
24 | return instance;
25 | }
26 |
27 | public Object getData(String key) {
28 | Object object = bigData.get(key);
29 | bigData.remove(key);
30 | return object;
31 | }
32 |
33 | public void putData(String key, Object data) {
34 | bigData.put(key, data);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/basemvplib/src/main/java/com/kunfei/basemvplib/impl/IPresenter.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.basemvplib.impl;
2 |
3 |
4 | import androidx.annotation.NonNull;
5 |
6 | public interface IPresenter {
7 | /**
8 | * 注入View,使之能够与View相互响应
9 | */
10 | void attachView(@NonNull IView iView);
11 |
12 | /**
13 | * 释放资源,如果使用了网络请求 可以在此执行IModel.cancelRequest()
14 | */
15 | void detachView();
16 | }
17 |
--------------------------------------------------------------------------------
/basemvplib/src/main/java/com/kunfei/basemvplib/impl/IView.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.basemvplib.impl;
2 |
3 | import android.content.Context;
4 |
5 | public interface IView {
6 | Context getContext();
7 |
8 | void toast(String msg);
9 |
10 | void toast(int id);
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/basemvplib/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/basemvplib/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/basemvplib/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/basemvplib/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/basemvplib/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/basemvplib/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/basemvplib/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/basemvplib/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/basemvplib/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/basemvplib/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/basemvplib/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #eb4333
4 | #439b53
5 |
6 |
--------------------------------------------------------------------------------
/basemvplib/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BaseMvpLib
3 |
4 |
--------------------------------------------------------------------------------
/basemvplib/src/test/java/com/kunfei/basemvplib/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kunfei.basemvplib;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | support_library_version = '28.0.0'
3 | }
4 | buildscript {
5 | ext.kotlin_version = '1.3.50'
6 | repositories {
7 | google()
8 | jcenter()
9 | mavenCentral()
10 | maven { url 'https://maven.fabric.io/public' }
11 | maven { url 'https://plugins.gradle.org/m2/' }
12 | }
13 | dependencies {
14 | classpath 'com.android.tools.build:gradle:3.5.1'
15 | classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
16 | classpath 'com.google.gms:google-services:4.3.2'
17 | classpath 'io.fabric.tools:gradle:1.28.1'
18 | classpath 'net.ricecode:string-similarity:1.0.0'
19 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
20 | classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
21 | }
22 | }
23 |
24 | allprojects {
25 | repositories {
26 | google()
27 | jcenter()
28 | mavenCentral()
29 | maven { url "https://jitpack.io" }
30 | maven { url 'https://maven.google.com/' }
31 | maven { url 'https://github.com/psiegman/mvn-repo/raw/master/releases' }
32 | }
33 | }
34 |
35 | task clean(type: Delete) {
36 | delete rootProject.buildDir
37 | }
38 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | ## For more details on how to configure your build environment visit
2 | # http://www.gradle.org/docs/current/userguide/build_environment.html
3 | #
4 | # Specifies the JVM arguments used for the daemon process.
5 | # The setting is particularly useful for tweaking memory settings.
6 | # Default value: -Xmx1024m -XX:MaxPermSize=256m
7 | org.gradle.jvmargs=-Xms1024m -Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
8 | #
9 | # When configured, Gradle will run in incubating parallel mode.
10 | # This option should only be used with decoupled projects. More details, visit
11 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
12 | # org.gradle.parallel=true
13 | #Fri Mar 30 10:51:47 CST 2018
14 | android.useAndroidX=true
15 | android.enableJetifier=true
16 | org.gradle.parallel=true
17 | org.gradle.damon=true
18 | org.gradle.configureondemand=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Apr 28 22:21:17 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/mail:
--------------------------------------------------------------------------------
1 | gekunfei@live.com
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':basemvplib'
2 |
--------------------------------------------------------------------------------
/tool/书源整理工具/BookSourceMgr.dpr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/BookSourceMgr.dpr
--------------------------------------------------------------------------------
/tool/书源整理工具/BookSourceMgr.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/BookSourceMgr.res
--------------------------------------------------------------------------------
/tool/书源整理工具/ReadMe.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/ReadMe.txt
--------------------------------------------------------------------------------
/tool/书源整理工具/bin/书源整理工具(2019.08.15).zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/bin/书源整理工具(2019.08.15).zip
--------------------------------------------------------------------------------
/tool/书源整理工具/doc/Main.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/doc/Main.ico
--------------------------------------------------------------------------------
/tool/书源整理工具/uBookSourceBean.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/uBookSourceBean.pas
--------------------------------------------------------------------------------
/tool/书源整理工具/uFrmEditSource.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/uFrmEditSource.pas
--------------------------------------------------------------------------------
/tool/书源整理工具/uFrmMain.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/uFrmMain.pas
--------------------------------------------------------------------------------
/tool/书源整理工具/uFrmReplaceGroup.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mabDc/MyBookshelf/7a6fc0bdb1e6ec7fbbdbf7257f1b120c54c1ce79/tool/书源整理工具/uFrmReplaceGroup.pas
--------------------------------------------------------------------------------