Merge pull request #241 from FadeApp/eink

添加 E-Ink 模式
pull/243/head
kunfei 5 years ago committed by GitHub
commit 5bf2fdb352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/build.gradle
  2. 1
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  3. 2
      app/src/main/java/io/legado/app/help/AppConfig.kt
  4. 15
      app/src/main/java/io/legado/app/help/ReadBookConfig.kt
  5. 4
      app/src/main/java/io/legado/app/ui/about/AboutFragment.kt
  6. 4
      app/src/main/java/io/legado/app/ui/about/DonateFragment.kt
  7. 2
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt
  8. 2
      app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverDialog.kt
  9. 2
      app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceDialog.kt
  10. 2
      app/src/main/java/io/legado/app/ui/book/download/DownloadActivity.kt
  11. 2
      app/src/main/java/io/legado/app/ui/book/explore/ExploreShowActivity.kt
  12. 1
      app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt
  13. 2
      app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt
  14. 1
      app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt
  15. 8
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  16. 2
      app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt
  17. 2
      app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt
  18. 4
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt
  19. 4
      app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt
  20. 2
      app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt
  21. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt
  22. 2
      app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugActivity.kt
  23. 2
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  24. 2
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  25. 2
      app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt
  26. 4
      app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt
  27. 3
      app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt
  28. 7
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt
  29. 3
      app/src/main/java/io/legado/app/ui/filechooser/FileChooserDialog.kt
  30. 2
      app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt
  31. 2
      app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt
  32. 17
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
  33. 2
      app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt
  34. 2
      app/src/main/java/io/legado/app/ui/replacerule/GroupManageDialog.kt
  35. 2
      app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt
  36. 2
      app/src/main/java/io/legado/app/ui/rss/source/debug/RssSourceDebugActivity.kt
  37. 2
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt
  38. 2
      app/src/main/java/io/legado/app/ui/rss/source/manage/GroupManageDialog.kt
  39. 2
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  40. 2
      app/src/main/java/io/legado/app/ui/widget/KeyboardToolPop.kt
  41. 1
      app/src/main/java/io/legado/app/ui/widget/font/FontSelectDialog.kt
  42. 2
      app/src/main/java/io/legado/app/ui/widget/prefs/IconListPreference.kt
  43. 2
      app/src/main/java/io/legado/app/ui/widget/recycler/RefreshRecyclerView.kt
  44. 6
      app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScrollRecyclerView.kt
  45. 17
      app/src/main/java/io/legado/app/utils/AnimationUtilsSupport.kt
  46. 41
      app/src/main/java/io/legado/app/utils/PreferenceFragmentSupport.kt
  47. 2
      app/src/main/res/layout/activity_arrange_book.xml
  48. 6
      app/src/main/res/layout/activity_book_search.xml
  49. 2
      app/src/main/res/layout/activity_book_source_edit.xml
  50. 2
      app/src/main/res/layout/activity_download.xml
  51. 2
      app/src/main/res/layout/activity_explore_show.xml
  52. 2
      app/src/main/res/layout/activity_import_book.xml
  53. 2
      app/src/main/res/layout/activity_replace_rule.xml
  54. 2
      app/src/main/res/layout/activity_rss_source_edit.xml
  55. 2
      app/src/main/res/layout/activity_source_debug.xml
  56. 2
      app/src/main/res/layout/dialog_book_group_picker.xml
  57. 2
      app/src/main/res/layout/dialog_change_cover.xml
  58. 2
      app/src/main/res/layout/dialog_change_source.xml
  59. 4
      app/src/main/res/layout/dialog_file_chooser.xml
  60. 2
      app/src/main/res/layout/dialog_font_select.xml
  61. 2
      app/src/main/res/layout/dialog_read_bg_text.xml
  62. 2
      app/src/main/res/layout/dialog_recycler_view.xml
  63. 2
      app/src/main/res/layout/dialog_toc_regex.xml
  64. 2
      app/src/main/res/layout/fragment_books.xml
  65. 2
      app/src/main/res/layout/fragment_find_book.xml
  66. 2
      app/src/main/res/layout/fragment_rss.xml
  67. 4
      app/src/main/res/layout/popup_action_menu.xml
  68. 2
      app/src/main/res/layout/popup_keyboard_tool.xml
  69. 2
      app/src/main/res/layout/view_refresh_recycler.xml
  70. 14
      app/src/main/res/xml/pref_main.xml

@ -192,6 +192,8 @@ dependencies {
// //
implementation 'com.hankcs:hanlp:portable-1.7.7' implementation 'com.hankcs:hanlp:portable-1.7.7'
//E-Ink
implementation 'fadeapp.widgets:scrollless-recyclerView:1.0.2'
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'

@ -43,6 +43,7 @@ object PreferKey {
const val readStyleSelect = "readStyleSelect" const val readStyleSelect = "readStyleSelect"
const val systemTypefaces = "system_typefaces" const val systemTypefaces = "system_typefaces"
const val readBodyToLh = "readBodyToLh" const val readBodyToLh = "readBodyToLh"
const val einkMode = "isEInkMode"
const val textFullJustify = "textFullJustify" const val textFullJustify = "textFullJustify"
const val autoReadSpeed = "autoReadSpeed" const val autoReadSpeed = "autoReadSpeed"
} }

@ -81,7 +81,7 @@ object AppConfig {
get() = App.INSTANCE.getPrefString(PreferKey.ttsSpeechPer) ?: "0" get() = App.INSTANCE.getPrefString(PreferKey.ttsSpeechPer) ?: "0"
val isEInkMode: Boolean val isEInkMode: Boolean
get() = App.INSTANCE.getPrefBoolean("isEInkMode") get() = App.INSTANCE.getPrefBoolean(PreferKey.einkMode)
val clickAllNext: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false) val clickAllNext: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false)

@ -26,12 +26,25 @@ object ReadBookConfig {
val json = String(App.INSTANCE.assets.open(readConfigFileName).readBytes()) val json = String(App.INSTANCE.assets.open(readConfigFileName).readBytes())
GSON.fromJsonArray<Config>(json)!! GSON.fromJsonArray<Config>(json)!!
} }
val durConfig get() = getConfig(styleSelect) val durConfig get() =
if (AppConfig.isEInkMode)
einkConfig
else
getConfig(styleSelect)
var bg: Drawable? = null var bg: Drawable? = null
var bgMeanColor: Int = 0 var bgMeanColor: Int = 0
val einkConfig:Config
init { init {
upConfig() upConfig()
einkConfig = Config(
bgStr = "#FFFFFF",
bgStrNight = "#FFFFFF",
textColor = "#000000",
textColorNight = "#000000",
darkStatusIconNight = true
)
} }
@Synchronized @Synchronized

@ -6,16 +6,16 @@ import android.os.Bundle
import android.view.View import android.view.View
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.ui.widget.dialog.TextDialog import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.PreferenceFragmentSupport
import io.legado.app.utils.openUrl import io.legado.app.utils.openUrl
import io.legado.app.utils.sendToClip import io.legado.app.utils.sendToClip
import io.legado.app.utils.toast import io.legado.app.utils.toast
class AboutFragment : PreferenceFragmentCompat() { class AboutFragment : PreferenceFragmentSupport() {
private val licenseUrl = "https://github.com/gedoor/legado/blob/master/LICENSE" private val licenseUrl = "https://github.com/gedoor/legado/blob/master/LICENSE"
private val disclaimerUrl = "https://gedoor.github.io/MyBookshelf/disclaimer.html" private val disclaimerUrl = "https://gedoor.github.io/MyBookshelf/disclaimer.html"

@ -5,14 +5,14 @@ import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.R import io.legado.app.R
import io.legado.app.utils.ACache import io.legado.app.utils.ACache
import io.legado.app.utils.PreferenceFragmentSupport
import io.legado.app.utils.openUrl import io.legado.app.utils.openUrl
import io.legado.app.utils.sendToClip import io.legado.app.utils.sendToClip
import org.jetbrains.anko.longToast import org.jetbrains.anko.longToast
class DonateFragment : PreferenceFragmentCompat() { class DonateFragment : PreferenceFragmentSupport() {
private val zfbHbRwmUrl = "https://gitee.com/gekunfei/Donate/raw/master/zfbhbrwm.png" private val zfbHbRwmUrl = "https://gitee.com/gekunfei/Donate/raw/master/zfbhbrwm.png"
private val zfbSkRwmUrl = "https://gitee.com/gekunfei/Donate/raw/master/zfbskrwm.jpg" private val zfbSkRwmUrl = "https://gitee.com/gekunfei/Donate/raw/master/zfbskrwm.jpg"

@ -15,6 +15,7 @@ import io.legado.app.constant.AppConst
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookGroup import io.legado.app.data.entities.BookGroup
import io.legado.app.help.AppConfig
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.noButton import io.legado.app.lib.dialogs.noButton
@ -65,6 +66,7 @@ class ArrangeBookActivity : VMBaseActivity<ArrangeBookViewModel>(R.layout.activi
private fun initView() { private fun initView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.addItemDecoration(VerticalDivider(this)) recycler_view.addItemDecoration(VerticalDivider(this))
adapter = ArrangeBookAdapter(this, this) adapter = ArrangeBookAdapter(this, this)

@ -14,6 +14,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.BaseDialogFragment import io.legado.app.base.BaseDialogFragment
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.help.AppConfig
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
import io.legado.app.utils.getViewModel import io.legado.app.utils.getViewModel
import kotlinx.android.synthetic.main.dialog_change_source.* import kotlinx.android.synthetic.main.dialog_change_source.*
@ -73,6 +74,7 @@ class ChangeCoverDialog : BaseDialogFragment(),
} }
private fun initView() { private fun initView() {
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = GridLayoutManager(requireContext(), 3) recycler_view.layoutManager = GridLayoutManager(requireContext(), 3)
adapter = CoverAdapter(requireContext(), this) adapter = CoverAdapter(requireContext(), this)
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -19,6 +19,7 @@ import io.legado.app.constant.PreferKey
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.SearchBook import io.legado.app.data.entities.SearchBook
import io.legado.app.help.AppConfig
import io.legado.app.ui.widget.recycler.VerticalDivider import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.getPrefBoolean
@ -92,6 +93,7 @@ class ChangeSourceDialog : BaseDialogFragment(),
private fun initRecyclerView() { private fun initRecyclerView() {
adapter = ChangeSourceAdapter(requireContext(), this) adapter = ChangeSourceAdapter(requireContext(), this)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(context) recycler_view.layoutManager = LinearLayoutManager(context)
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -16,6 +16,7 @@ import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookChapter
import io.legado.app.help.AppConfig
import io.legado.app.help.BookHelp import io.legado.app.help.BookHelp
import io.legado.app.service.help.Download import io.legado.app.service.help.Download
import io.legado.app.ui.filechooser.FileChooserDialog import io.legado.app.ui.filechooser.FileChooserDialog
@ -74,6 +75,7 @@ class DownloadActivity : VMBaseActivity<DownloadViewModel>(R.layout.activity_dow
} }
private fun initRecyclerView() { private fun initRecyclerView() {
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
adapter = DownloadAdapter(this, this) adapter = DownloadAdapter(this, this)
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -8,6 +8,7 @@ import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.SearchBook import io.legado.app.data.entities.SearchBook
import io.legado.app.help.AppConfig
import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.ui.book.info.BookInfoActivity
import io.legado.app.ui.widget.recycler.LoadMoreView import io.legado.app.ui.widget.recycler.LoadMoreView
import io.legado.app.ui.widget.recycler.VerticalDivider import io.legado.app.ui.widget.recycler.VerticalDivider
@ -32,6 +33,7 @@ class ExploreShowActivity : VMBaseActivity<ExploreShowViewModel>(R.layout.activi
} }
private fun initRecyclerView() { private fun initRecyclerView() {
recycler_view.isEnableScroll = !AppConfig.isEInkMode
adapter = ExploreShowAdapter(this, this) adapter = ExploreShowAdapter(this, this)
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.addItemDecoration(VerticalDivider(this)) recycler_view.addItemDecoration(VerticalDivider(this))

@ -71,6 +71,7 @@ class GroupManageDialog : DialogFragment(), Toolbar.OnMenuItemClickListener {
private fun initData() { private fun initData() {
adapter = GroupAdapter(requireContext()) adapter = GroupAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -22,6 +22,7 @@ import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.data.entities.BookGroup import io.legado.app.data.entities.BookGroup
import io.legado.app.help.AppConfig
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.customView import io.legado.app.lib.dialogs.customView
@ -96,6 +97,7 @@ class GroupSelectDialog : DialogFragment(), Toolbar.OnMenuItemClickListener {
tool_bar.setOnMenuItemClickListener(this) tool_bar.setOnMenuItemClickListener(this)
tool_bar.menu.setGroupVisible(R.id.menu_groups, false) tool_bar.menu.setGroupVisible(R.id.menu_groups, false)
adapter = GroupAdapter(requireContext()) adapter = GroupAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -62,6 +62,7 @@ class ImportBookActivity : VMBaseActivity<ImportBookViewModel>(R.layout.activity
} }
private fun initView() { private fun initView() {
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
adapter = ImportBookAdapter(this, this) adapter = ImportBookAdapter(this, this)
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -194,8 +194,8 @@ class ReadMenu : FrameLayout {
} }
private fun initAnimation() { private fun initAnimation() {
menuTopIn = AnimationUtils.loadAnimation(context, R.anim.anim_readbook_top_in) menuTopIn = AnimationUtilsSupport.loadAnimation(context, R.anim.anim_readbook_top_in)
menuBottomIn = AnimationUtils.loadAnimation(context, R.anim.anim_readbook_bottom_in) menuBottomIn = AnimationUtilsSupport.loadAnimation(context, R.anim.anim_readbook_bottom_in)
menuTopIn.setAnimationListener(object : Animation.AnimationListener { menuTopIn.setAnimationListener(object : Animation.AnimationListener {
override fun onAnimationStart(animation: Animation) { override fun onAnimationStart(animation: Animation) {
callBack?.upSystemUiVisibility() callBack?.upSystemUiVisibility()
@ -217,8 +217,8 @@ class ReadMenu : FrameLayout {
}) })
//隐藏菜单 //隐藏菜单
menuTopOut = AnimationUtils.loadAnimation(context, R.anim.anim_readbook_top_out) menuTopOut = AnimationUtilsSupport.loadAnimation(context, R.anim.anim_readbook_top_out)
menuBottomOut = AnimationUtils.loadAnimation(context, R.anim.anim_readbook_bottom_out) menuBottomOut = AnimationUtilsSupport.loadAnimation(context, R.anim.anim_readbook_bottom_out)
menuTopOut.setAnimationListener(object : Animation.AnimationListener { menuTopOut.setAnimationListener(object : Animation.AnimationListener {
override fun onAnimationStart(animation: Animation) { override fun onAnimationStart(animation: Animation) {
vw_menu_bg.setOnClickListener(null) vw_menu_bg.setOnClickListener(null)

@ -20,6 +20,7 @@ import androidx.core.view.isVisible
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.help.AppConfig
import io.legado.app.service.BaseReadAloudService import io.legado.app.service.BaseReadAloudService
import io.legado.app.utils.gone import io.legado.app.utils.gone
import io.legado.app.utils.isAbsUrl import io.legado.app.utils.isAbsUrl
@ -61,6 +62,7 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac
} }
private fun initRecyclerView() = with(contentView) { private fun initRecyclerView() = with(contentView) {
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.adapter = adapter recycler_view.adapter = adapter
recycler_view_more.adapter = adapter recycler_view_more.adapter = adapter
SupportMenuInflater(context).inflate(R.menu.content_select_action, menu) SupportMenuInflater(context).inflate(R.menu.content_select_action, menu)

@ -22,6 +22,7 @@ import io.legado.app.base.BaseDialogFragment
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.help.AppConfig
import io.legado.app.help.ImageLoader import io.legado.app.help.ImageLoader
import io.legado.app.help.ReadBookConfig import io.legado.app.help.ReadBookConfig
import io.legado.app.help.permission.Permissions import io.legado.app.help.permission.Permissions
@ -83,6 +84,7 @@ class BgTextConfigDialog : BaseDialogFragment() {
private fun initData() = with(ReadBookConfig.durConfig) { private fun initData() = with(ReadBookConfig.durConfig) {
sw_dark_status_icon.isChecked = statusIconDark() sw_dark_status_icon.isChecked = statusIconDark()
adapter = BgAdapter(requireContext()) adapter = BgAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = recycler_view.layoutManager =
LinearLayoutManager(requireContext(), RecyclerView.HORIZONTAL, false) LinearLayoutManager(requireContext(), RecyclerView.HORIZONTAL, false)
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -10,7 +10,6 @@ import android.view.ViewGroup
import android.widget.LinearLayout import android.widget.LinearLayout
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
@ -18,6 +17,7 @@ import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.bottomBackground
import io.legado.app.ui.book.read.Help import io.legado.app.ui.book.read.Help
import io.legado.app.utils.PreferenceFragmentSupport
import io.legado.app.utils.dp import io.legado.app.utils.dp
import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.getPrefBoolean
import io.legado.app.utils.postEvent import io.legado.app.utils.postEvent
@ -64,7 +64,7 @@ class MoreConfigDialog : DialogFragment() {
.commit() .commit()
} }
class ReadPreferenceFragment : PreferenceFragmentCompat(), class ReadPreferenceFragment : PreferenceFragmentSupport(),
SharedPreferences.OnSharedPreferenceChangeListener { SharedPreferences.OnSharedPreferenceChangeListener {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {

@ -10,7 +10,6 @@ import android.widget.LinearLayout
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import androidx.preference.ListPreference import androidx.preference.ListPreference
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
@ -20,6 +19,7 @@ import io.legado.app.lib.theme.backgroundColor
import io.legado.app.service.BaseReadAloudService import io.legado.app.service.BaseReadAloudService
import io.legado.app.service.help.ReadAloud import io.legado.app.service.help.ReadAloud
import io.legado.app.ui.book.read.Help import io.legado.app.ui.book.read.Help
import io.legado.app.utils.PreferenceFragmentSupport
import io.legado.app.utils.postEvent import io.legado.app.utils.postEvent
class ReadAloudConfigDialog : DialogFragment() { class ReadAloudConfigDialog : DialogFragment() {
@ -59,7 +59,7 @@ class ReadAloudConfigDialog : DialogFragment() {
.commit() .commit()
} }
class ReadAloudPreferenceFragment : PreferenceFragmentCompat(), class ReadAloudPreferenceFragment : PreferenceFragmentSupport(),
SharedPreferences.OnSharedPreferenceChangeListener { SharedPreferences.OnSharedPreferenceChangeListener {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {

@ -23,6 +23,7 @@ import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.data.entities.TxtTocRule import io.legado.app.data.entities.TxtTocRule
import io.legado.app.help.AppConfig
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.cancelButton import io.legado.app.lib.dialogs.cancelButton
@ -77,6 +78,7 @@ class TocRegexDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
private fun initView() { private fun initView() {
adapter = TocRegexAdapter(requireContext()) adapter = TocRegexAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -18,6 +18,7 @@ import io.legado.app.constant.PreferKey
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.SearchBook import io.legado.app.data.entities.SearchBook
import io.legado.app.data.entities.SearchKeyword import io.legado.app.data.entities.SearchKeyword
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryTextColor import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.ui.book.info.BookInfoActivity
@ -134,6 +135,9 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_book_se
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
ATH.applyEdgeEffectColor(rv_bookshelf_search) ATH.applyEdgeEffectColor(rv_bookshelf_search)
ATH.applyEdgeEffectColor(rv_history_key) ATH.applyEdgeEffectColor(rv_history_key)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
rv_bookshelf_search.isEnableScroll = !AppConfig.isEInkMode
rv_history_key.isEnableScroll = !AppConfig.isEInkMode
bookAdapter = BookAdapter(this, this) bookAdapter = BookAdapter(this, this)
rv_bookshelf_search.layoutManager = FlexboxLayoutManager(this) rv_bookshelf_search.layoutManager = FlexboxLayoutManager(this)
rv_bookshelf_search.adapter = bookAdapter rv_bookshelf_search.adapter = bookAdapter

@ -8,6 +8,7 @@ import androidx.appcompat.widget.SearchView
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.ui.qrcode.QrCodeActivity import io.legado.app.ui.qrcode.QrCodeActivity
@ -44,6 +45,7 @@ class BookSourceDebugActivity :
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
adapter = BookSourceDebugAdapter(this) adapter = BookSourceDebugAdapter(this)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.adapter = adapter recycler_view.adapter = adapter
rotate_loading.loadingColor = accentColor rotate_loading.loadingColor = accentColor

@ -21,6 +21,7 @@ import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.AppConst import io.legado.app.constant.AppConst
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.data.entities.rule.* import io.legado.app.data.entities.rule.*
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.ui.book.source.debug.BookSourceDebugActivity import io.legado.app.ui.book.source.debug.BookSourceDebugActivity
@ -120,6 +121,7 @@ class BookSourceEditActivity :
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
mSoftKeyboardTool = KeyboardToolPop(this, AppConst.keyboardToolChars, this) mSoftKeyboardTool = KeyboardToolPop(this, AppConst.keyboardToolChars, this)
window.decorView.viewTreeObserver.addOnGlobalLayoutListener(KeyboardOnGlobalChangeListener()) window.decorView.viewTreeObserver.addOnGlobalLayoutListener(KeyboardOnGlobalChangeListener())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.adapter = adapter recycler_view.adapter = adapter
tab_layout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { tab_layout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {

@ -20,6 +20,7 @@ import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.help.AppConfig
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.dialogs.* import io.legado.app.lib.dialogs.*
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
@ -152,6 +153,7 @@ class BookSourceActivity : VMBaseActivity<BookSourceViewModel>(R.layout.activity
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.addItemDecoration(VerticalDivider(this)) recycler_view.addItemDecoration(VerticalDivider(this))
adapter = BookSourceAdapter(this, this) adapter = BookSourceAdapter(this, this)

@ -18,6 +18,7 @@ import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.customView import io.legado.app.lib.dialogs.customView
import io.legado.app.lib.dialogs.noButton import io.legado.app.lib.dialogs.noButton
@ -63,6 +64,7 @@ class GroupManageDialog : DialogFragment(), Toolbar.OnMenuItemClickListener {
tool_bar.menu.applyTint(requireContext(), Theme.getTheme()) tool_bar.menu.applyTint(requireContext(), Theme.getTheme())
tool_bar.setOnMenuItemClickListener(this) tool_bar.setOnMenuItemClickListener(this)
adapter = GroupAdapter(requireContext()) adapter = GroupAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -8,15 +8,15 @@ import android.view.View
import androidx.preference.EditTextPreference import androidx.preference.EditTextPreference
import androidx.preference.ListPreference import androidx.preference.ListPreference
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.ui.filechooser.FileChooserDialog import io.legado.app.ui.filechooser.FileChooserDialog
import io.legado.app.utils.PreferenceFragmentSupport
import io.legado.app.utils.getPrefString import io.legado.app.utils.getPrefString
class BackupConfigFragment : PreferenceFragmentCompat(), class BackupConfigFragment : PreferenceFragmentSupport(),
SharedPreferences.OnSharedPreferenceChangeListener, SharedPreferences.OnSharedPreferenceChangeListener,
FileChooserDialog.CallBack { FileChooserDialog.CallBack {

@ -7,7 +7,6 @@ import android.os.Bundle
import android.view.View import android.view.View
import androidx.preference.ListPreference import androidx.preference.ListPreference
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
@ -21,7 +20,7 @@ import io.legado.app.ui.widget.number.NumberPickerDialog
import io.legado.app.utils.* import io.legado.app.utils.*
class OtherConfigFragment : PreferenceFragmentCompat(), class OtherConfigFragment : PreferenceFragmentSupport(),
SharedPreferences.OnSharedPreferenceChangeListener { SharedPreferences.OnSharedPreferenceChangeListener {
private val packageManager = App.INSTANCE.packageManager private val packageManager = App.INSTANCE.packageManager

@ -9,7 +9,6 @@ import android.view.MenuInflater
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
@ -26,7 +25,7 @@ import io.legado.app.ui.widget.prefs.IconListPreference
import io.legado.app.utils.* import io.legado.app.utils.*
class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedPreferenceChangeListener { class ThemeConfigFragment : PreferenceFragmentSupport(), SharedPreferences.OnSharedPreferenceChangeListener {
val items = arrayListOf("极简", "曜夜", "经典", "黑白", "A屏黑") val items = arrayListOf("极简", "曜夜", "经典", "黑白", "A屏黑")
@ -156,18 +155,20 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar
putPrefInt("colorPrimary", getCompatColor(R.color.white)) putPrefInt("colorPrimary", getCompatColor(R.color.white))
putPrefInt("colorAccent", getCompatColor(R.color.black)) putPrefInt("colorAccent", getCompatColor(R.color.black))
putPrefInt("colorBackground", getCompatColor(R.color.white)) putPrefInt("colorBackground", getCompatColor(R.color.white))
putPrefInt("colorBottomBackground", getCompatColor(R.color.white))
AppConfig.isNightTheme = false AppConfig.isNightTheme = false
} }
4 -> { 4 -> {
putPrefInt("colorPrimaryNight", getCompatColor(R.color.black)) putPrefInt("colorPrimaryNight", getCompatColor(R.color.black))
putPrefInt( putPrefInt(
"colorAccentNight", "colorAccentNight",
getCompatColor(R.color.md_grey_600) getCompatColor(R.color.md_grey_500)
) )
putPrefInt( putPrefInt(
"colorBackgroundNight", "colorBackgroundNight",
getCompatColor(R.color.black) getCompatColor(R.color.black)
) )
putPrefInt("colorBottomBackgroundNight", getCompatColor(R.color.black))
AppConfig.isNightTheme = true AppConfig.isNightTheme = true
} }
} }

@ -13,6 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.help.AppConfig
import io.legado.app.ui.filechooser.adapter.FileAdapter import io.legado.app.ui.filechooser.adapter.FileAdapter
import io.legado.app.ui.filechooser.adapter.PathAdapter import io.legado.app.ui.filechooser.adapter.PathAdapter
import io.legado.app.ui.widget.recycler.VerticalDivider import io.legado.app.ui.widget.recycler.VerticalDivider
@ -137,10 +138,12 @@ class FileChooserDialog : DialogFragment(),
fileAdapter = FileAdapter(requireContext(), this) fileAdapter = FileAdapter(requireContext(), this)
pathAdapter = PathAdapter(requireContext(), this) pathAdapter = PathAdapter(requireContext(), this)
rv_file.isEnableScroll = !AppConfig.isEInkMode
rv_file.addItemDecoration(VerticalDivider(requireContext())) rv_file.addItemDecoration(VerticalDivider(requireContext()))
rv_file.layoutManager = LinearLayoutManager(activity) rv_file.layoutManager = LinearLayoutManager(activity)
rv_file.adapter = fileAdapter rv_file.adapter = fileAdapter
rv_path.isEnableScroll = !AppConfig.isEInkMode
rv_path.layoutManager = LinearLayoutManager(activity, RecyclerView.HORIZONTAL, false) rv_path.layoutManager = LinearLayoutManager(activity, RecyclerView.HORIZONTAL, false)
rv_path.adapter = pathAdapter rv_path.adapter = pathAdapter

@ -16,6 +16,7 @@ import io.legado.app.constant.BookType
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.help.AppConfig
import io.legado.app.help.IntentDataHelp import io.legado.app.help.IntentDataHelp
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
@ -76,6 +77,7 @@ class BooksFragment : BaseFragment(R.layout.fragment_books),
rv_bookshelf.layoutManager = GridLayoutManager(context, bookshelfLayout + 2) rv_bookshelf.layoutManager = GridLayoutManager(context, bookshelfLayout + 2)
booksAdapter = BooksAdapterGrid(requireContext(), this) booksAdapter = BooksAdapterGrid(requireContext(), this)
} }
rv_bookshelf.isEnableScroll = !AppConfig.isEInkMode
rv_bookshelf.adapter = booksAdapter rv_bookshelf.adapter = booksAdapter
booksAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() { booksAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) { override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {

@ -15,6 +15,7 @@ import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseFragment import io.legado.app.base.VMBaseFragment
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryTextColor import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.book.explore.ExploreShowActivity import io.legado.app.ui.book.explore.ExploreShowActivity
@ -75,6 +76,7 @@ class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_find_
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(rv_find) ATH.applyEdgeEffectColor(rv_find)
rv_find.isEnableScroll = !AppConfig.isEInkMode
linearLayoutManager = LinearLayoutManager(context) linearLayoutManager = LinearLayoutManager(context)
rv_find.layoutManager = linearLayoutManager rv_find.layoutManager = linearLayoutManager
adapter = ExploreAdapter(requireContext(), this, this) adapter = ExploreAdapter(requireContext(), this, this)

@ -7,13 +7,13 @@ import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import androidx.preference.Preference import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.BaseFragment import io.legado.app.base.BaseFragment
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.help.AppConfig import io.legado.app.help.AppConfig
import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.service.WebService import io.legado.app.service.WebService
import io.legado.app.ui.about.AboutActivity import io.legado.app.ui.about.AboutActivity
@ -65,7 +65,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog.
BackupRestoreUi.onActivityResult(requestCode, resultCode, data) BackupRestoreUi.onActivityResult(requestCode, resultCode, data)
} }
class PreferenceFragment : PreferenceFragmentCompat(), class PreferenceFragment : PreferenceFragmentSupport(),
SharedPreferences.OnSharedPreferenceChangeListener { SharedPreferences.OnSharedPreferenceChangeListener {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
@ -121,6 +121,19 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog.
} }
} }
"recordLog" -> LogUtils.upLevel() "recordLog" -> LogUtils.upLevel()
PreferKey.einkMode -> {
//既然是 E-Ink 模式,为什么不一步到位呢
if (AppConfig.isEInkMode) {
ReadBookConfig.pageAnim = 4
putPrefInt("colorPrimary", getCompatColor(R.color.white))
putPrefInt("colorAccent", getCompatColor(R.color.black))
putPrefInt("colorBackground", getCompatColor(R.color.white))
putPrefInt("colorBottomBackground", getCompatColor(R.color.white))
AppConfig.isNightTheme = false
App.INSTANCE.applyDayNight()
postEvent(EventBus.RECREATE, "")
}
}
} }
} }

@ -10,6 +10,7 @@ import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseFragment import io.legado.app.base.VMBaseFragment
import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.RssSource
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.ui.main.MainViewModel import io.legado.app.ui.main.MainViewModel
import io.legado.app.ui.rss.article.RssSortActivity import io.legado.app.ui.rss.article.RssSortActivity
@ -51,6 +52,7 @@ class RssFragment : VMBaseFragment<RssSourceViewModel>(R.layout.fragment_rss),
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
adapter = RssAdapter(requireContext(), this) adapter = RssAdapter(requireContext(), this)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = GridLayoutManager(requireContext(), 4) recycler_view.layoutManager = GridLayoutManager(requireContext(), 4)
recycler_view.adapter = adapter recycler_view.adapter = adapter
} }

@ -18,6 +18,7 @@ import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.customView import io.legado.app.lib.dialogs.customView
import io.legado.app.lib.dialogs.noButton import io.legado.app.lib.dialogs.noButton
@ -63,6 +64,7 @@ class GroupManageDialog : DialogFragment(), Toolbar.OnMenuItemClickListener {
tool_bar.menu.applyTint(requireContext(), Theme.getTheme()) tool_bar.menu.applyTint(requireContext(), Theme.getTheme())
tool_bar.setOnMenuItemClickListener(this) tool_bar.setOnMenuItemClickListener(this)
adapter = GroupAdapter(requireContext()) adapter = GroupAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -20,6 +20,7 @@ import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.data.entities.ReplaceRule import io.legado.app.data.entities.ReplaceRule
import io.legado.app.help.AppConfig
import io.legado.app.help.BookHelp import io.legado.app.help.BookHelp
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.coroutine.Coroutine
@ -101,6 +102,7 @@ class ReplaceRuleActivity : VMBaseActivity<ReplaceRuleViewModel>(R.layout.activi
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
adapter = ReplaceRuleAdapter(this, this) adapter = ReplaceRuleAdapter(this, this)
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -4,6 +4,7 @@ import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.getViewModel import io.legado.app.utils.getViewModel
@ -40,6 +41,7 @@ class RssSourceDebugActivity : VMBaseActivity<RssSourceDebugModel>(R.layout.acti
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
adapter = RssSourceDebugAdapter(this) adapter = RssSourceDebugAdapter(this)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.adapter = adapter recycler_view.adapter = adapter
rotate_loading.loadingColor = accentColor rotate_loading.loadingColor = accentColor

@ -18,6 +18,7 @@ import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.AppConst import io.legado.app.constant.AppConst
import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.RssSource
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.ui.qrcode.QrCodeActivity import io.legado.app.ui.qrcode.QrCodeActivity
@ -119,6 +120,7 @@ class RssSourceEditActivity :
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
mSoftKeyboardTool = KeyboardToolPop(this, AppConst.keyboardToolChars, this) mSoftKeyboardTool = KeyboardToolPop(this, AppConst.keyboardToolChars, this)
window.decorView.viewTreeObserver.addOnGlobalLayoutListener(this) window.decorView.viewTreeObserver.addOnGlobalLayoutListener(this)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.adapter = adapter recycler_view.adapter = adapter
} }

@ -18,6 +18,7 @@ import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.customView import io.legado.app.lib.dialogs.customView
import io.legado.app.lib.dialogs.noButton import io.legado.app.lib.dialogs.noButton
@ -61,6 +62,7 @@ class GroupManageDialog : DialogFragment(), Toolbar.OnMenuItemClickListener {
tool_bar.menu.applyTint(requireContext(), Theme.getTheme()) tool_bar.menu.applyTint(requireContext(), Theme.getTheme())
tool_bar.setOnMenuItemClickListener(this) tool_bar.setOnMenuItemClickListener(this)
adapter = GroupAdapter(requireContext()) adapter = GroupAdapter(requireContext())
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
recycler_view.addItemDecoration(VerticalDivider(requireContext())) recycler_view.addItemDecoration(VerticalDivider(requireContext()))
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -20,6 +20,7 @@ import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.RssSource
import io.legado.app.help.AppConfig
import io.legado.app.help.ItemTouchCallback import io.legado.app.help.ItemTouchCallback
import io.legado.app.lib.dialogs.* import io.legado.app.lib.dialogs.*
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
@ -137,6 +138,7 @@ class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_r
private fun initRecyclerView() { private fun initRecyclerView() {
ATH.applyEdgeEffectColor(recycler_view) ATH.applyEdgeEffectColor(recycler_view)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(this) recycler_view.layoutManager = LinearLayoutManager(this)
recycler_view.addItemDecoration(VerticalDivider(this)) recycler_view.addItemDecoration(VerticalDivider(this))
adapter = RssSourceAdapter(this, this) adapter = RssSourceAdapter(this, this)

@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.help.AppConfig
import kotlinx.android.synthetic.main.item_fillet_text.view.* import kotlinx.android.synthetic.main.item_fillet_text.view.*
import kotlinx.android.synthetic.main.popup_keyboard_tool.view.* import kotlinx.android.synthetic.main.popup_keyboard_tool.view.*
import org.jetbrains.anko.sdk27.listeners.onClick import org.jetbrains.anko.sdk27.listeners.onClick
@ -34,6 +35,7 @@ class KeyboardToolPop(
private fun initRecyclerView() = with(contentView) { private fun initRecyclerView() = with(contentView) {
val adapter = Adapter(context) val adapter = Adapter(context)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false) recycler_view.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false)
recycler_view.adapter = adapter recycler_view.adapter = adapter
adapter.setItems(chars) adapter.setItems(chars)

@ -64,6 +64,7 @@ class FontSelectDialog : BaseDialogFragment(),
tool_bar.setTitle(R.string.select_font) tool_bar.setTitle(R.string.select_font)
tool_bar.inflateMenu(R.menu.font_select) tool_bar.inflateMenu(R.menu.font_select)
tool_bar.setOnMenuItemClickListener(this) tool_bar.setOnMenuItemClickListener(this)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
adapter = FontAdapter(requireContext(), this) adapter = FontAdapter(requireContext(), this)
recycler_view.layoutManager = LinearLayoutManager(context) recycler_view.layoutManager = LinearLayoutManager(context)
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -18,6 +18,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.help.AppConfig
import io.legado.app.utils.getCompatDrawable import io.legado.app.utils.getCompatDrawable
import kotlinx.android.synthetic.main.dialog_recycler_view.* import kotlinx.android.synthetic.main.dialog_recycler_view.*
import kotlinx.android.synthetic.main.item_icon_preference.view.* import kotlinx.android.synthetic.main.item_icon_preference.view.*
@ -138,6 +139,7 @@ class IconListPreference(context: Context, attrs: AttributeSet) : ListPreference
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
tool_bar.setTitle(R.string.change_icon) tool_bar.setTitle(R.string.change_icon)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.layoutManager = LinearLayoutManager(requireContext()) recycler_view.layoutManager = LinearLayoutManager(requireContext())
val adapter = Adapter(requireContext()) val adapter = Adapter(requireContext())
recycler_view.adapter = adapter recycler_view.adapter = adapter

@ -9,6 +9,7 @@ import android.view.View
import android.widget.LinearLayout import android.widget.LinearLayout
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.legado.app.R import io.legado.app.R
import io.legado.app.help.AppConfig
import kotlinx.android.synthetic.main.view_refresh_recycler.view.* import kotlinx.android.synthetic.main.view_refresh_recycler.view.*
@ -22,6 +23,7 @@ class RefreshRecyclerView(context: Context?, attrs: AttributeSet?) : LinearLayou
init { init {
orientation = VERTICAL orientation = VERTICAL
LayoutInflater.from(context).inflate(R.layout.view_refresh_recycler, this, true) LayoutInflater.from(context).inflate(R.layout.view_refresh_recycler, this, true)
recycler_view.isEnableScroll = !AppConfig.isEInkMode
recycler_view.setOnTouchListener(object : OnTouchListener { recycler_view.setOnTouchListener(object : OnTouchListener {
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
override fun onTouch(v: View?, event: MotionEvent?): Boolean { override fun onTouch(v: View?, event: MotionEvent?): Boolean {

@ -5,9 +5,11 @@ import android.util.AttributeSet
import android.view.ViewGroup import android.view.ViewGroup
import androidx.annotation.ColorInt import androidx.annotation.ColorInt
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import fadeapp.widgets.ScrollLessRecyclerView
import io.legado.app.R import io.legado.app.R
import io.legado.app.help.AppConfig
class FastScrollRecyclerView : RecyclerView { class FastScrollRecyclerView : ScrollLessRecyclerView {
private var mFastScroller: FastScroller? = null private var mFastScroller: FastScroller? = null
@ -189,7 +191,7 @@ class FastScrollRecyclerView : RecyclerView {
private fun layout(context: Context, attrs: AttributeSet?) { private fun layout(context: Context, attrs: AttributeSet?) {
mFastScroller = FastScroller(context, attrs) mFastScroller = FastScroller(context, attrs)
mFastScroller?.id = R.id.fast_scroller mFastScroller?.id = R.id.fast_scroller
isEnableScroll = !AppConfig.isEInkMode
} }
} }

@ -0,0 +1,17 @@
package io.legado.app.utils
import android.content.Context
import android.view.animation.Animation
import android.view.animation.AnimationUtils
import androidx.annotation.AnimRes
import io.legado.app.help.AppConfig
object AnimationUtilsSupport {
fun loadAnimation(context: Context, @AnimRes id: Int): Animation {
val animation = AnimationUtils.loadAnimation(context, id)
if (AppConfig.isEInkMode) {
animation.duration = 0
}
return animation
}
}

@ -0,0 +1,41 @@
package io.legado.app.utils
import android.content.pm.PackageManager
import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.view.setPadding
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceRecyclerViewAccessibilityDelegate
import androidx.recyclerview.widget.RecyclerView
import fadeapp.widgets.ScrollLessRecyclerView
import io.legado.app.R
import io.legado.app.help.AppConfig
abstract class PreferenceFragmentSupport : PreferenceFragmentCompat(){
override fun onCreateRecyclerView(
inflater: LayoutInflater,
parent: ViewGroup,
savedInstanceState: Bundle?
): RecyclerView {
if (context?.packageManager?.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)==true) {
val recyclerView: RecyclerView?= parent.findViewById(R.id.recycler_view)
if (recyclerView != null) {
return recyclerView
}
}
val recyclerView = ScrollLessRecyclerView(inflater.context,null,R.attr.preferenceFragmentListStyle)
recyclerView.id = R.id.recycler_view
recyclerView.setPadding(0)
recyclerView.clipToPadding = false
recyclerView.isEnableScroll = !AppConfig.isEInkMode
recyclerView.layoutManager = onCreateLayoutManager()
recyclerView.setAccessibilityDelegateCompat(
PreferenceRecyclerViewAccessibilityDelegate(recyclerView)
)
return recyclerView
}
}

@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:title="@string/arrange_bookshelf" /> app:title="@string/arrange_bookshelf" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"

@ -29,7 +29,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/refresh_progress_bar"> app:layout_constraintTop_toBottomOf="@id/refresh_progress_bar">
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
@ -56,7 +56,7 @@
android:text="@string/bookshelf" android:text="@string/bookshelf"
android:visibility="gone" /> android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/rv_bookshelf_search" android:id="@+id/rv_bookshelf_search"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -84,7 +84,7 @@
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/rv_history_key" android:id="@+id/rv_history_key"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -96,7 +96,7 @@
</com.google.android.material.tabs.TabLayout> </com.google.android.material.tabs.TabLayout>
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:title="@string/download_offline" /> app:title="@string/download_offline" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -22,7 +22,7 @@
app:layout_constraintTop_toBottomOf="@id/title_bar"> app:layout_constraintTop_toBottomOf="@id/title_bar">
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -53,7 +53,7 @@
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
app:layout_constraintTop_toBottomOf="@id/layTop" app:layout_constraintTop_toBottomOf="@id/layTop"

@ -14,7 +14,7 @@
app:contentLayout="@layout/view_search" app:contentLayout="@layout/view_search"
app:title="@string/replace_purify" /> app:title="@string/replace_purify" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"

@ -59,7 +59,7 @@
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -14,7 +14,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:title="@string/debug_source" /> app:title="@string/debug_source" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"

@ -11,7 +11,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:background="@color/background_card" android:background="@color/background_card"
android:layout_width="match_parent" android:layout_width="match_parent"

@ -19,7 +19,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" /> android:layout_height="2dp" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -19,7 +19,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" /> android:layout_height="2dp" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -10,7 +10,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/rv_path" android:id="@+id/rv_path"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="24dp" android:layout_height="24dp"
@ -24,7 +24,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/background_card"> android:background="@color/background_card">
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/rv_file" android:id="@+id/rv_file"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -10,7 +10,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -79,7 +79,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/bg_image" /> android:text="@string/bg_image" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" /> android:layout_height="100dp" />

@ -11,7 +11,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:background="@color/background_card" android:background="@color/background_card"
android:layout_width="match_parent" android:layout_width="match_parent"

@ -11,7 +11,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:background="@color/background_card" android:background="@color/background_card"
android:layout_width="match_parent" android:layout_width="match_parent"

@ -4,7 +4,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/rv_bookshelf" android:id="@+id/rv_bookshelf"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -14,7 +14,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:title="@string/find" /> app:title="@string/find" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/rv_find" android:id="@+id/rv_find"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -12,7 +12,7 @@
app:attachToActivity="false" app:attachToActivity="false"
app:title="@string/rss" /> app:title="@string/rss" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -13,7 +13,7 @@
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_vertical"> android:gravity="center_vertical">
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -33,7 +33,7 @@
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view_more" android:id="@+id/recycler_view_more"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" <fadeapp.widgets.ScrollLessRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

@ -8,7 +8,7 @@
android:layout_height="2dp" android:layout_height="2dp"
app:layout_constraintTop_toBottomOf="@id/title_bar" /> app:layout_constraintTop_toBottomOf="@id/title_bar" />
<androidx.recyclerview.widget.RecyclerView <fadeapp.widgets.ScrollLessRecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

@ -30,13 +30,13 @@
android:icon="@drawable/ic_cfg_theme" android:icon="@drawable/ic_cfg_theme"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<!-- <io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="isEInkMode" android:icon="@drawable/ic_cfg_e_lnk"
android:title="@string/eink_theme" android:key="isEInkMode"
android:summary="@string/eink_theme_desc" android:summary="@string/eink_theme_desc"
android:icon="@drawable/ic_cfg_e_lnk" android:title="@string/eink_theme"
app:iconSpaceReserved="false" />--> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"

Loading…
Cancel
Save