From 095d3126c68a74af4728071cbc7cc0f78342f0d7 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 12 Sep 2019 23:01:34 +0800 Subject: [PATCH] up --- app/src/main/AndroidManifest.xml | 16 +- .../app/receiver/MediaButtonReceiver.kt | 2 +- .../app/service/BaseReadAloudService.kt | 2 +- .../info}/BookInfoActivity.kt | 8 +- .../info}/BookInfoViewModel.kt | 2 +- .../info}/ChapterListAdapter.kt | 2 +- .../info}/edit/BookInfoEditActivity.kt | 2 +- .../info}/edit/BookInfoEditViewModel.kt | 2 +- .../app/ui/{readbook => book/read}/Help.kt | 2 +- .../read}/ReadBookActivity.kt | 9 +- .../read}/ReadBookViewModel.kt | 2 +- .../ui/{readbook => book/read}/ReadMenu.kt | 2 +- .../read}/config/BgTextConfigDialog.kt | 4 +- .../read}/config/MoreConfigDialog.kt | 7 +- .../read}/config/PaddingConfigDialog.kt | 4 +- .../read}/config/ReadAloudConfigDialog.kt | 7 +- .../read}/config/ReadAloudDialog.kt | 4 +- .../read}/config/ReadStyleDialog.kt | 6 +- .../app/ui/{ => book}/search/DiffCallBack.kt | 2 +- .../ui/{ => book}/search/SearchActivity.kt | 4 +- .../app/ui/{ => book}/search/SearchAdapter.kt | 2 +- .../ui/{ => book}/search/SearchViewModel.kt | 2 +- .../source/debug}/SourceDebugActivity.kt | 4 +- .../source/debug}/SourceDebugAdapter.kt | 2 +- .../source/debug}/SourceDebugModel.kt | 2 +- .../source/edit}/SourceEditActivity.kt | 320 +++++++++++++++--- .../source/edit}/SourceEditAdapter.kt | 8 +- .../source/edit}/SourceEditViewModel.kt | 2 +- .../source/manage}/BookSourceActivity.kt | 11 +- .../source/manage}/BookSourceAdapter.kt | 2 +- .../source/manage}/BookSourceViewModel.kt | 2 +- .../source/manage}/DiffCallBack.kt | 2 +- .../source/manage}/GroupManageDialog.kt | 2 +- .../app/ui/explore/ExploreShowActivity.kt | 2 +- .../ui/main/bookshelf/BookshelfFragment.kt | 6 +- .../app/ui/main/explore/ExploreFragment.kt | 2 +- .../io/legado/app/ui/main/my/MyFragment.kt | 2 +- .../app/ui/rss/article/RssArticlesActivity.kt | 3 + .../{readrss => rss/read}/ReadRssActivity.kt | 2 +- .../app/ui/rss/source/RssSourceActivity.kt | 2 + .../main/res/layout/activity_explore_show.xml | 2 +- .../main/res/layout/activity_read_book.xml | 2 +- app/src/main/res/layout/activity_search.xml | 2 +- app/src/main/res/xml/shortcuts.xml | 2 +- 44 files changed, 362 insertions(+), 115 deletions(-) rename app/src/main/java/io/legado/app/ui/{bookinfo => book/info}/BookInfoActivity.kt (97%) rename app/src/main/java/io/legado/app/ui/{bookinfo => book/info}/BookInfoViewModel.kt (99%) rename app/src/main/java/io/legado/app/ui/{bookinfo => book/info}/ChapterListAdapter.kt (97%) rename app/src/main/java/io/legado/app/ui/{bookinfo => book/info}/edit/BookInfoEditActivity.kt (98%) rename app/src/main/java/io/legado/app/ui/{bookinfo => book/info}/edit/BookInfoEditViewModel.kt (94%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/Help.kt (98%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/ReadBookActivity.kt (98%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/ReadBookViewModel.kt (99%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/ReadMenu.kt (99%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/config/BgTextConfigDialog.kt (98%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/config/MoreConfigDialog.kt (94%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/config/PaddingConfigDialog.kt (98%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/config/ReadAloudConfigDialog.kt (96%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/config/ReadAloudDialog.kt (98%) rename app/src/main/java/io/legado/app/ui/{readbook => book/read}/config/ReadStyleDialog.kt (98%) rename app/src/main/java/io/legado/app/ui/{ => book}/search/DiffCallBack.kt (97%) rename app/src/main/java/io/legado/app/ui/{ => book}/search/SearchActivity.kt (97%) rename app/src/main/java/io/legado/app/ui/{ => book}/search/SearchAdapter.kt (99%) rename app/src/main/java/io/legado/app/ui/{ => book}/search/SearchViewModel.kt (98%) rename app/src/main/java/io/legado/app/ui/{sourcedebug => book/source/debug}/SourceDebugActivity.kt (96%) rename app/src/main/java/io/legado/app/ui/{sourcedebug => book/source/debug}/SourceDebugAdapter.kt (92%) rename app/src/main/java/io/legado/app/ui/{sourcedebug => book/source/debug}/SourceDebugModel.kt (96%) rename app/src/main/java/io/legado/app/ui/{sourceedit => book/source/edit}/SourceEditActivity.kt (61%) rename app/src/main/java/io/legado/app/ui/{sourceedit => book/source/edit}/SourceEditAdapter.kt (92%) rename app/src/main/java/io/legado/app/ui/{sourceedit => book/source/edit}/SourceEditViewModel.kt (97%) rename app/src/main/java/io/legado/app/ui/{booksource => book/source/manage}/BookSourceActivity.kt (96%) rename app/src/main/java/io/legado/app/ui/{booksource => book/source/manage}/BookSourceAdapter.kt (99%) rename app/src/main/java/io/legado/app/ui/{booksource => book/source/manage}/BookSourceViewModel.kt (98%) rename app/src/main/java/io/legado/app/ui/{booksource => book/source/manage}/DiffCallBack.kt (97%) rename app/src/main/java/io/legado/app/ui/{booksource => book/source/manage}/GroupManageDialog.kt (99%) create mode 100644 app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt rename app/src/main/java/io/legado/app/ui/{readrss => rss/read}/ReadRssActivity.kt (86%) create mode 100644 app/src/main/java/io/legado/app/ui/rss/source/RssSourceActivity.kt diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 242d2710a..3b8e4dab2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -39,7 +39,7 @@ - + - - - - + + + + - + diff --git a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt index 99d838494..f1c3b5bf6 100644 --- a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt +++ b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt @@ -6,7 +6,7 @@ import android.content.Intent import android.view.KeyEvent import io.legado.app.constant.Bus import io.legado.app.help.ActivityHelp -import io.legado.app.ui.readbook.ReadBookActivity +import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.utils.postEvent diff --git a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt index e3cee17be..ad204f420 100644 --- a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt @@ -20,7 +20,7 @@ import io.legado.app.constant.Status import io.legado.app.help.IntentDataHelp import io.legado.app.help.MediaHelp import io.legado.app.receiver.MediaButtonReceiver -import io.legado.app.ui.readbook.ReadBookActivity +import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.widget.page.TextChapter import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.postEvent diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt rename to app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt index 3334adfb4..b650584c6 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.bookinfo +package io.legado.app.ui.book.info import android.os.Bundle import android.view.Menu @@ -12,10 +12,10 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.help.ImageLoader import io.legado.app.lib.theme.ATH -import io.legado.app.ui.bookinfo.edit.BookInfoEditActivity +import io.legado.app.ui.book.info.edit.BookInfoEditActivity +import io.legado.app.ui.book.read.ReadBookActivity +import io.legado.app.ui.book.source.edit.SourceEditActivity import io.legado.app.ui.changesource.ChangeSourceDialog -import io.legado.app.ui.readbook.ReadBookActivity -import io.legado.app.ui.sourceedit.SourceEditActivity import io.legado.app.utils.getCompatDrawable import io.legado.app.utils.getViewModel import io.legado.app.utils.gone diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt rename to app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt index 5b99563e8..cb54f4df1 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.bookinfo +package io.legado.app.ui.book.info import android.app.Application import android.content.Intent diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt rename to app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt index 3b2edf158..bfe98f4d8 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.bookinfo +package io.legado.app.ui.book.info import android.content.Context import io.legado.app.R diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/edit/BookInfoEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/edit/BookInfoEditActivity.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/bookinfo/edit/BookInfoEditActivity.kt rename to app/src/main/java/io/legado/app/ui/book/info/edit/BookInfoEditActivity.kt index 6becac683..fcc4e7e24 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/edit/BookInfoEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/edit/BookInfoEditActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.bookinfo.edit +package io.legado.app.ui.book.info.edit import android.os.Bundle import android.view.Menu diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/edit/BookInfoEditViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/edit/BookInfoEditViewModel.kt similarity index 94% rename from app/src/main/java/io/legado/app/ui/bookinfo/edit/BookInfoEditViewModel.kt rename to app/src/main/java/io/legado/app/ui/book/info/edit/BookInfoEditViewModel.kt index fb33a22e7..a947719cd 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/edit/BookInfoEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/edit/BookInfoEditViewModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.bookinfo.edit +package io.legado.app.ui.book.info.edit import android.app.Application import androidx.lifecycle.MutableLiveData diff --git a/app/src/main/java/io/legado/app/ui/readbook/Help.kt b/app/src/main/java/io/legado/app/ui/book/read/Help.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/readbook/Help.kt rename to app/src/main/java/io/legado/app/ui/book/read/Help.kt index 72d65da5f..1ff72d7dc 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/Help.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/Help.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook +package io.legado.app.ui.book.read import android.app.Activity import android.view.View diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt rename to app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 448f1cbe3..c61e8cac3 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook +package io.legado.app.ui.book.read import android.app.Activity import android.content.Intent @@ -27,13 +27,14 @@ import io.legado.app.lib.dialogs.noButton import io.legado.app.lib.dialogs.okButton import io.legado.app.receiver.TimeElectricityReceiver import io.legado.app.service.BaseReadAloudService +import io.legado.app.ui.book.read.config.* +import io.legado.app.ui.book.read.config.BgTextConfigDialog.Companion.BG_COLOR +import io.legado.app.ui.book.read.config.BgTextConfigDialog.Companion.TEXT_COLOR +import io.legado.app.ui.book.source.edit.SourceEditActivity import io.legado.app.ui.changesource.ChangeSourceDialog import io.legado.app.ui.chapterlist.ChapterListActivity import io.legado.app.ui.readbook.config.* -import io.legado.app.ui.readbook.config.BgTextConfigDialog.Companion.BG_COLOR -import io.legado.app.ui.readbook.config.BgTextConfigDialog.Companion.TEXT_COLOR import io.legado.app.ui.replacerule.ReplaceRuleActivity -import io.legado.app.ui.sourceedit.SourceEditActivity import io.legado.app.ui.widget.page.ChapterProvider import io.legado.app.ui.widget.page.PageView import io.legado.app.ui.widget.page.TextChapter diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt rename to app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index 0dcdeef47..635deb97e 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook +package io.legado.app.ui.book.read import android.app.Application import android.content.Intent diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt rename to app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt index b0b79603e..af02fa16c 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook +package io.legado.app.ui.book.read import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt rename to app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt index 98abc2dd2..d8112b538 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook.config +package io.legado.app.ui.book.read.config import android.annotation.SuppressLint import android.app.Activity.RESULT_OK @@ -24,7 +24,7 @@ import io.legado.app.help.ImageLoader import io.legado.app.help.ReadBookConfig import io.legado.app.help.permission.Permissions import io.legado.app.help.permission.PermissionsCompat -import io.legado.app.ui.readbook.Help +import io.legado.app.ui.book.read.Help import io.legado.app.utils.FileUtils import io.legado.app.utils.getCompatColor import io.legado.app.utils.postEvent diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt similarity index 94% rename from app/src/main/java/io/legado/app/ui/readbook/config/MoreConfigDialog.kt rename to app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index ba7aca78f..51470b2ee 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook.config +package io.legado.app.ui.book.read.config import android.content.SharedPreferences import android.os.Bundle @@ -13,7 +13,7 @@ import androidx.preference.PreferenceFragmentCompat import io.legado.app.R import io.legado.app.constant.Bus import io.legado.app.lib.theme.ATH -import io.legado.app.ui.readbook.Help +import io.legado.app.ui.book.read.Help import io.legado.app.utils.postEvent class MoreConfigDialog : DialogFragment() { @@ -53,7 +53,8 @@ class MoreConfigDialog : DialogFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) var preferenceFragment = childFragmentManager.findFragmentByTag(readPreferTag) - if (preferenceFragment == null) preferenceFragment = ReadPreferenceFragment() + if (preferenceFragment == null) preferenceFragment = + ReadPreferenceFragment() childFragmentManager.beginTransaction() .replace(view.id, preferenceFragment, readPreferTag) .commit() diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt rename to app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt index 4d349b9cb..3c172cea2 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook.config +package io.legado.app.ui.book.read.config import android.os.Bundle import android.util.DisplayMetrics @@ -10,7 +10,7 @@ import androidx.fragment.app.DialogFragment import io.legado.app.R import io.legado.app.constant.Bus import io.legado.app.help.ReadBookConfig -import io.legado.app.ui.readbook.Help +import io.legado.app.ui.book.read.Help import io.legado.app.utils.postEvent import kotlinx.android.synthetic.main.dialog_read_padding.* import org.jetbrains.anko.sdk27.listeners.onClick diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt similarity index 96% rename from app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudConfigDialog.kt rename to app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt index f0bfd6231..699037325 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook.config +package io.legado.app.ui.book.read.config import android.content.SharedPreferences import android.os.Bundle @@ -16,7 +16,7 @@ import io.legado.app.constant.Bus import io.legado.app.help.ReadAloud import io.legado.app.lib.theme.ATH import io.legado.app.service.BaseReadAloudService -import io.legado.app.ui.readbook.Help +import io.legado.app.ui.book.read.Help import io.legado.app.utils.getPrefString import io.legado.app.utils.postEvent @@ -51,7 +51,8 @@ class ReadAloudConfigDialog : DialogFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) var preferenceFragment = childFragmentManager.findFragmentByTag(readAloudPreferTag) - if (preferenceFragment == null) preferenceFragment = ReadAloudPreferenceFragment() + if (preferenceFragment == null) preferenceFragment = + ReadAloudPreferenceFragment() childFragmentManager.beginTransaction() .replace(view.id, preferenceFragment, readAloudPreferTag) .commit() diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt rename to app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt index dc5d26350..e9f524dcb 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook.config +package io.legado.app.ui.book.read.config import android.os.Bundle import android.util.DisplayMetrics @@ -13,7 +13,7 @@ import io.legado.app.constant.Bus import io.legado.app.constant.Status import io.legado.app.help.ReadAloud import io.legado.app.service.BaseReadAloudService -import io.legado.app.ui.readbook.Help +import io.legado.app.ui.book.read.Help import io.legado.app.utils.* import kotlinx.android.synthetic.main.dialog_read_aloud.* import org.jetbrains.anko.sdk27.listeners.onClick diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt rename to app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index a0080036c..42edae9a3 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readbook.config +package io.legado.app.ui.book.read.config import android.os.Bundle import android.util.DisplayMetrics @@ -16,8 +16,8 @@ import io.legado.app.help.ReadBookConfig import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.primaryColor -import io.legado.app.ui.readbook.Help -import io.legado.app.ui.readbook.ReadBookActivity +import io.legado.app.ui.book.read.Help +import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.widget.font.FontSelectDialog import io.legado.app.utils.* import kotlinx.android.synthetic.main.activity_read_book.* diff --git a/app/src/main/java/io/legado/app/ui/search/DiffCallBack.kt b/app/src/main/java/io/legado/app/ui/book/search/DiffCallBack.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/search/DiffCallBack.kt rename to app/src/main/java/io/legado/app/ui/book/search/DiffCallBack.kt index b974cb059..0de21ee19 100644 --- a/app/src/main/java/io/legado/app/ui/search/DiffCallBack.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/DiffCallBack.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.search +package io.legado.app.ui.book.search import androidx.recyclerview.widget.DiffUtil import io.legado.app.data.entities.SearchShow diff --git a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/search/SearchActivity.kt rename to app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt index 7d206cb43..64d5d76f8 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.search +package io.legado.app.ui.book.search import android.os.Bundle import androidx.appcompat.widget.SearchView @@ -13,7 +13,7 @@ import io.legado.app.base.VMBaseActivity import io.legado.app.data.entities.SearchShow import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.primaryTextColor -import io.legado.app.ui.bookinfo.BookInfoActivity +import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.utils.getViewModel import io.legado.app.utils.invisible import io.legado.app.utils.visible diff --git a/app/src/main/java/io/legado/app/ui/search/SearchAdapter.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/search/SearchAdapter.kt rename to app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt index 0b40007ff..a2cb9ad08 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.search +package io.legado.app.ui.book.search import android.view.LayoutInflater import android.view.View diff --git a/app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt rename to app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt index 0fbb8c772..f8550229f 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchViewModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.search +package io.legado.app.ui.book.search import android.app.Application import io.legado.app.App diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugActivity.kt similarity index 96% rename from app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt rename to app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugActivity.kt index 2290654e4..de2ef20e7 100644 --- a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugActivity.kt @@ -1,10 +1,9 @@ -package io.legado.app.ui.sourcedebug +package io.legado.app.ui.book.source.debug import android.content.Intent import android.os.Bundle import android.view.Menu import android.view.MenuItem -import android.view.View import androidx.appcompat.widget.SearchView import androidx.recyclerview.widget.LinearLayoutManager import io.legado.app.R @@ -15,7 +14,6 @@ import io.legado.app.ui.qrcode.QrCodeActivity import io.legado.app.utils.getViewModel import kotlinx.android.synthetic.main.activity_source_debug.* import kotlinx.android.synthetic.main.view_search.* -import kotlinx.android.synthetic.main.view_title_bar.* import kotlinx.coroutines.launch import org.jetbrains.anko.startActivityForResult import org.jetbrains.anko.toast diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugAdapter.kt b/app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugAdapter.kt similarity index 92% rename from app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugAdapter.kt rename to app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugAdapter.kt index b8b821ea1..0c057fda0 100644 --- a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugAdapter.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.sourcedebug +package io.legado.app.ui.book.source.debug import android.content.Context import io.legado.app.R diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt b/app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugModel.kt similarity index 96% rename from app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt rename to app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugModel.kt index 6873a30cb..a17565820 100644 --- a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/debug/SourceDebugModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.sourcedebug +package io.legado.app.ui.book.source.debug import android.app.Application import io.legado.app.App diff --git a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditActivity.kt similarity index 61% rename from app/src/main/java/io/legado/app/ui/sourceedit/SourceEditActivity.kt rename to app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditActivity.kt index 2bea174be..faaf38ff6 100644 --- a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.sourceedit +package io.legado.app.ui.book.source.edit import android.app.Activity import android.content.ClipData @@ -20,7 +20,7 @@ import io.legado.app.base.VMBaseActivity import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.rule.* import io.legado.app.lib.theme.ATH -import io.legado.app.ui.sourcedebug.SourceDebugActivity +import io.legado.app.ui.book.source.debug.SourceDebugActivity import io.legado.app.ui.widget.KeyboardToolPop import io.legado.app.utils.GSON import io.legado.app.utils.getViewModel @@ -147,67 +147,243 @@ class SourceEditActivity : with(bookSource) { sourceEntities.clear() sourceEntities - .add(EditEntity("bookSourceUrl", this?.bookSourceUrl, R.string.book_source_url)) + .add( + EditEntity( + "bookSourceUrl", + this?.bookSourceUrl, + R.string.book_source_url + ) + ) sourceEntities - .add(EditEntity("bookSourceName", this?.bookSourceName, R.string.book_source_name)) + .add( + EditEntity( + "bookSourceName", + this?.bookSourceName, + R.string.book_source_name + ) + ) sourceEntities.add( - EditEntity("bookSourceGroup", this?.bookSourceGroup, R.string.book_source_group) + EditEntity( + "bookSourceGroup", + this?.bookSourceGroup, + R.string.book_source_group + ) ) sourceEntities - .add(EditEntity("loginUrl", this?.loginUrl, R.string.book_source_login_url)) + .add( + EditEntity( + "loginUrl", + this?.loginUrl, + R.string.book_source_login_url + ) + ) sourceEntities - .add(EditEntity("bookUrlPattern", this?.bookUrlPattern, R.string.book_url_pattern)) - sourceEntities.add(EditEntity("header", this?.header, R.string.source_http_header)) + .add( + EditEntity( + "bookUrlPattern", + this?.bookUrlPattern, + R.string.book_url_pattern + ) + ) + sourceEntities.add( + EditEntity( + "header", + this?.header, + R.string.source_http_header + ) + ) } //搜索 with(bookSource?.getSearchRule()) { searchEntities.clear() searchEntities - .add(EditEntity("searchUrl", bookSource?.searchUrl, R.string.rule_search_url)) - searchEntities.add(EditEntity("bookList", this?.bookList, R.string.rule_book_list)) - searchEntities.add(EditEntity("name", this?.name, R.string.rule_book_name)) - searchEntities.add(EditEntity("author", this?.author, R.string.rule_book_author)) - searchEntities.add(EditEntity("kind", this?.kind, R.string.rule_book_kind)) - searchEntities.add(EditEntity("wordCount", this?.wordCount, R.string.rule_word_count)) + .add( + EditEntity( + "searchUrl", + bookSource?.searchUrl, + R.string.rule_search_url + ) + ) + searchEntities.add( + EditEntity( + "bookList", + this?.bookList, + R.string.rule_book_list + ) + ) + searchEntities.add( + EditEntity( + "name", + this?.name, + R.string.rule_book_name + ) + ) + searchEntities.add( + EditEntity( + "author", + this?.author, + R.string.rule_book_author + ) + ) + searchEntities.add( + EditEntity( + "kind", + this?.kind, + R.string.rule_book_kind + ) + ) + searchEntities.add( + EditEntity( + "wordCount", + this?.wordCount, + R.string.rule_word_count + ) + ) searchEntities - .add(EditEntity("lastChapter", this?.lastChapter, R.string.rule_last_chapter)) - searchEntities.add(EditEntity("intro", this?.intro, R.string.rule_book_intro)) - searchEntities.add(EditEntity("coverUrl", this?.coverUrl, R.string.rule_cover_url)) - searchEntities.add(EditEntity("bookUrl", this?.bookUrl, R.string.rule_book_url)) + .add( + EditEntity( + "lastChapter", + this?.lastChapter, + R.string.rule_last_chapter + ) + ) + searchEntities.add( + EditEntity( + "intro", + this?.intro, + R.string.rule_book_intro + ) + ) + searchEntities.add( + EditEntity( + "coverUrl", + this?.coverUrl, + R.string.rule_cover_url + ) + ) + searchEntities.add( + EditEntity( + "bookUrl", + this?.bookUrl, + R.string.rule_book_url + ) + ) } //详情页 with(bookSource?.getBookInfoRule()) { infoEntities.clear() - infoEntities.add(EditEntity("init", this?.init, R.string.rule_book_info_init)) - infoEntities.add(EditEntity("name", this?.name, R.string.rule_book_name)) - infoEntities.add(EditEntity("author", this?.author, R.string.rule_book_author)) - infoEntities.add(EditEntity("coverUrl", this?.coverUrl, R.string.rule_cover_url)) - infoEntities.add(EditEntity("intro", this?.intro, R.string.rule_book_intro)) - infoEntities.add(EditEntity("kind", this?.kind, R.string.rule_book_kind)) - infoEntities.add(EditEntity("wordCount", this?.wordCount, R.string.rule_word_count)) infoEntities.add( - EditEntity("lastChapter", this?.lastChapter, R.string.rule_last_chapter) + EditEntity( + "init", + this?.init, + R.string.rule_book_info_init + ) + ) + infoEntities.add( + EditEntity( + "name", + this?.name, + R.string.rule_book_name + ) + ) + infoEntities.add( + EditEntity( + "author", + this?.author, + R.string.rule_book_author + ) + ) + infoEntities.add( + EditEntity( + "coverUrl", + this?.coverUrl, + R.string.rule_cover_url + ) + ) + infoEntities.add( + EditEntity( + "intro", + this?.intro, + R.string.rule_book_intro + ) + ) + infoEntities.add( + EditEntity( + "kind", + this?.kind, + R.string.rule_book_kind + ) + ) + infoEntities.add( + EditEntity( + "wordCount", + this?.wordCount, + R.string.rule_word_count + ) + ) + infoEntities.add( + EditEntity( + "lastChapter", + this?.lastChapter, + R.string.rule_last_chapter + ) + ) + infoEntities.add( + EditEntity( + "tocUrl", + this?.tocUrl, + R.string.rule_toc_url + ) ) - infoEntities.add(EditEntity("tocUrl", this?.tocUrl, R.string.rule_toc_url)) } //目录页 with(bookSource?.getTocRule()) { tocEntities.clear() tocEntities.add( - EditEntity("chapterList", this?.chapterList, R.string.rule_chapter_list) + EditEntity( + "chapterList", + this?.chapterList, + R.string.rule_chapter_list + ) + ) + tocEntities.add( + EditEntity( + "chapterName", + this?.chapterName, + R.string.rule_chapter_name + ) ) tocEntities.add( - EditEntity("chapterName", this?.chapterName, R.string.rule_chapter_name) + EditEntity( + "chapterUrl", + this?.chapterUrl, + R.string.rule_chapter_url + ) + ) + tocEntities.add( + EditEntity( + "nextTocUrl", + this?.nextTocUrl, + R.string.rule_next_toc_url + ) ) - tocEntities.add(EditEntity("chapterUrl", this?.chapterUrl, R.string.rule_chapter_url)) - tocEntities.add(EditEntity("nextTocUrl", this?.nextTocUrl, R.string.rule_next_toc_url)) } //正文页 with(bookSource?.getContentRule()) { contentEntities.clear() - contentEntities.add(EditEntity("content", this?.content, R.string.rule_book_content)) contentEntities.add( - EditEntity("nextContentUrl", this?.nextContentUrl, R.string.rule_content_url_next) + EditEntity( + "content", + this?.content, + R.string.rule_book_content + ) + ) + contentEntities.add( + EditEntity( + "nextContentUrl", + this?.nextContentUrl, + R.string.rule_content_url_next + ) ) } @@ -215,19 +391,75 @@ class SourceEditActivity : with(bookSource?.getExploreRule()) { findEntities.clear() findEntities.add( - EditEntity("exploreUrl", bookSource?.exploreUrl, R.string.rule_find_url) - ) - findEntities.add(EditEntity("bookList", this?.bookList, R.string.rule_book_list)) - findEntities.add(EditEntity("name", this?.name, R.string.rule_book_name)) - findEntities.add(EditEntity("author", this?.author, R.string.rule_book_author)) - findEntities.add(EditEntity("kind", this?.kind, R.string.rule_book_kind)) - findEntities.add(EditEntity("wordCount", this?.wordCount, R.string.rule_word_count)) - findEntities.add(EditEntity("intro", this?.intro, R.string.rule_book_intro)) + EditEntity( + "exploreUrl", + bookSource?.exploreUrl, + R.string.rule_find_url + ) + ) + findEntities.add( + EditEntity( + "bookList", + this?.bookList, + R.string.rule_book_list + ) + ) + findEntities.add( + EditEntity( + "name", + this?.name, + R.string.rule_book_name + ) + ) + findEntities.add( + EditEntity( + "author", + this?.author, + R.string.rule_book_author + ) + ) + findEntities.add( + EditEntity( + "kind", + this?.kind, + R.string.rule_book_kind + ) + ) + findEntities.add( + EditEntity( + "wordCount", + this?.wordCount, + R.string.rule_word_count + ) + ) + findEntities.add( + EditEntity( + "intro", + this?.intro, + R.string.rule_book_intro + ) + ) + findEntities.add( + EditEntity( + "lastChapter", + this?.lastChapter, + R.string.rule_last_chapter + ) + ) + findEntities.add( + EditEntity( + "coverUrl", + this?.coverUrl, + R.string.rule_cover_url + ) + ) findEntities.add( - EditEntity("lastChapter", this?.lastChapter, R.string.rule_last_chapter) + EditEntity( + "bookUrl", + this?.bookUrl, + R.string.rule_book_url + ) ) - findEntities.add(EditEntity("coverUrl", this?.coverUrl, R.string.rule_cover_url)) - findEntities.add(EditEntity("bookUrl", this?.bookUrl, R.string.rule_book_url)) } setEditEntities(0) } diff --git a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditAdapter.kt similarity index 92% rename from app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt rename to app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditAdapter.kt index 87f977082..3ac5fc3d1 100644 --- a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditAdapter.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.sourceedit +package io.legado.app.ui.book.source.edit import android.text.Editable import android.text.TextWatcher @@ -18,7 +18,11 @@ class SourceEditAdapter : RecyclerView.Adapter() } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder { - return MyViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_source_edit, parent, false)) + return MyViewHolder( + LayoutInflater.from( + parent.context + ).inflate(R.layout.item_source_edit, parent, false) + ) } override fun onBindViewHolder(holder: MyViewHolder, position: Int) { diff --git a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditViewModel.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/sourceedit/SourceEditViewModel.kt rename to app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditViewModel.kt index ef8d75740..c3af29a6a 100644 --- a/app/src/main/java/io/legado/app/ui/sourceedit/SourceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/SourceEditViewModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.sourceedit +package io.legado.app.ui.book.source.edit import android.app.Application import android.content.ClipboardManager diff --git a/app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt similarity index 96% rename from app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt rename to app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 597cbeffa..573444123 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.booksource +package io.legado.app.ui.book.source.manage import android.content.Intent import android.os.Bundle @@ -21,8 +21,8 @@ import io.legado.app.help.ItemTouchCallback import io.legado.app.help.storage.Restore import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.primaryTextColor +import io.legado.app.ui.book.source.edit.SourceEditActivity import io.legado.app.ui.qrcode.QrCodeActivity -import io.legado.app.ui.sourceedit.SourceEditActivity import io.legado.app.utils.getViewModel import io.legado.app.utils.splitNotBlank import kotlinx.android.synthetic.main.activity_book_source.* @@ -121,7 +121,12 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity } bookSourceLiveDate?.observe(this, Observer { search_view.queryHint = getString(R.string.search_book_source_num, it.size) - val diffResult = DiffUtil.calculateDiff(DiffCallBack(adapter.getItems(), it)) + val diffResult = DiffUtil.calculateDiff( + DiffCallBack( + adapter.getItems(), + it + ) + ) adapter.setItemsNoNotify(it) diffResult.dispatchUpdatesTo(adapter) }) diff --git a/app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt rename to app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt index 8152ba18a..c7c432e16 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceAdapter.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.booksource +package io.legado.app.ui.book.source.manage import android.content.Context import android.view.Menu diff --git a/app/src/main/java/io/legado/app/ui/booksource/BookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/booksource/BookSourceViewModel.kt rename to app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt index d2842a579..289b3a84a 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/BookSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.booksource +package io.legado.app.ui.book.source.manage import android.app.Application import android.text.TextUtils diff --git a/app/src/main/java/io/legado/app/ui/booksource/DiffCallBack.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/DiffCallBack.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/booksource/DiffCallBack.kt rename to app/src/main/java/io/legado/app/ui/book/source/manage/DiffCallBack.kt index 90036ba58..0e8d9bead 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/DiffCallBack.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/DiffCallBack.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.booksource +package io.legado.app.ui.book.source.manage import androidx.recyclerview.widget.DiffUtil import io.legado.app.data.entities.BookSource diff --git a/app/src/main/java/io/legado/app/ui/booksource/GroupManageDialog.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt similarity index 99% rename from app/src/main/java/io/legado/app/ui/booksource/GroupManageDialog.kt rename to app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt index e5ed98578..bf44c56a5 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/GroupManageDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.booksource +package io.legado.app.ui.book.source.manage import android.annotation.SuppressLint import android.content.Context diff --git a/app/src/main/java/io/legado/app/ui/explore/ExploreShowActivity.kt b/app/src/main/java/io/legado/app/ui/explore/ExploreShowActivity.kt index 9dff24ede..1d2ba0b4e 100644 --- a/app/src/main/java/io/legado/app/ui/explore/ExploreShowActivity.kt +++ b/app/src/main/java/io/legado/app/ui/explore/ExploreShowActivity.kt @@ -8,7 +8,7 @@ import androidx.recyclerview.widget.RecyclerView import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.data.entities.SearchBook -import io.legado.app.ui.bookinfo.BookInfoActivity +import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.utils.getViewModel import kotlinx.android.synthetic.main.activity_explore_show.* import org.jetbrains.anko.startActivity diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index 77a91e0a6..8e8a581a0 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -22,10 +22,10 @@ import io.legado.app.data.entities.BookGroup import io.legado.app.lib.dialogs.* import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.accentColor -import io.legado.app.ui.bookinfo.BookInfoActivity +import io.legado.app.ui.book.info.BookInfoActivity +import io.legado.app.ui.book.read.ReadBookActivity +import io.legado.app.ui.book.search.SearchActivity import io.legado.app.ui.bookshelf.BookshelfActivity -import io.legado.app.ui.readbook.ReadBookActivity -import io.legado.app.ui.search.SearchActivity import io.legado.app.utils.* import kotlinx.android.synthetic.main.dialog_edittext.view.* import kotlinx.android.synthetic.main.fragment_bookshelf.* diff --git a/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt b/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt index 5c7d78e72..888dbe4ac 100644 --- a/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt @@ -10,8 +10,8 @@ import io.legado.app.R import io.legado.app.base.VMBaseFragment import io.legado.app.data.entities.BookSource import io.legado.app.lib.theme.ATH +import io.legado.app.ui.book.source.edit.SourceEditActivity import io.legado.app.ui.explore.ExploreShowActivity -import io.legado.app.ui.sourceedit.SourceEditActivity import io.legado.app.utils.getViewModel import io.legado.app.utils.startActivity import kotlinx.android.synthetic.main.fragment_find_book.* diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index 553b6fee7..333fd9689 100644 --- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -13,7 +13,7 @@ import io.legado.app.base.BaseFragment import io.legado.app.lib.theme.ATH import io.legado.app.ui.about.AboutActivity import io.legado.app.ui.about.DonateActivity -import io.legado.app.ui.booksource.BookSourceActivity +import io.legado.app.ui.book.source.manage.BookSourceActivity import io.legado.app.ui.config.ConfigActivity import io.legado.app.ui.config.ConfigViewModel import io.legado.app.ui.replacerule.ReplaceRuleActivity diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt new file mode 100644 index 000000000..a69c70fb5 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt @@ -0,0 +1,3 @@ +package io.legado.app.ui.rss.article + +class RssArticlesActivity \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/readrss/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt similarity index 86% rename from app/src/main/java/io/legado/app/ui/readrss/ReadRssActivity.kt rename to app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index 32d14c9ce..5e7972c6d 100644 --- a/app/src/main/java/io/legado/app/ui/readrss/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.readrss +package io.legado.app.ui.rss.read import android.os.Bundle import io.legado.app.R diff --git a/app/src/main/java/io/legado/app/ui/rss/source/RssSourceActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/RssSourceActivity.kt new file mode 100644 index 000000000..899e41398 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/rss/source/RssSourceActivity.kt @@ -0,0 +1,2 @@ +package io.legado.app.ui.rss.source + diff --git a/app/src/main/res/layout/activity_explore_show.xml b/app/src/main/res/layout/activity_explore_show.xml index 8df05cb8c..9bfab0f58 100644 --- a/app/src/main/res/layout/activity_explore_show.xml +++ b/app/src/main/res/layout/activity_explore_show.xml @@ -4,7 +4,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context="io.legado.app.ui.search.SearchActivity"> + tools:context=".ui.book.search.SearchActivity"> - + tools:context=".ui.book.search.SearchActivity"> + android:targetClass="io.legado.app.ui.book.read.ReadBookActivity" />