pull/1395/head
gedoor 3 years ago
parent efe99f2a5a
commit 61a9a40292
  1. 75
      app/src/main/java/io/legado/app/lib/theme/ATH.kt
  2. 27
      app/src/main/java/io/legado/app/lib/theme/view/ThemeBottomNavigationVIew.kt
  3. 2
      app/src/main/java/io/legado/app/lib/theme/view/ThemeCheckBox.kt
  4. 2
      app/src/main/java/io/legado/app/lib/theme/view/ThemeProgressBar.kt
  5. 3
      app/src/main/java/io/legado/app/lib/theme/view/ThemeRadioButton.kt
  6. 2
      app/src/main/java/io/legado/app/lib/theme/view/ThemeRadioNoButton.kt
  7. 2
      app/src/main/java/io/legado/app/lib/theme/view/ThemeSeekBar.kt
  8. 2
      app/src/main/java/io/legado/app/lib/theme/view/ThemeSwitch.kt
  9. 5
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt
  10. 5
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt
  11. 4
      app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt
  12. 3
      app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt
  13. 6
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt
  14. 5
      app/src/main/java/io/legado/app/ui/book/source/debug/BookSourceDebugActivity.kt
  15. 4
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  16. 4
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  17. 5
      app/src/main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt
  18. 4
      app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt
  19. 4
      app/src/main/java/io/legado/app/ui/config/CoverConfigFragment.kt
  20. 4
      app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt
  21. 4
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt
  22. 6
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt
  23. 5
      app/src/main/java/io/legado/app/ui/main/bookshelf/style1/BookshelfFragment1.kt
  24. 9
      app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksFragment.kt
  25. 4
      app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt
  26. 9
      app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt
  27. 4
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
  28. 4
      app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt
  29. 4
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt
  30. 5
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesFragment.kt
  31. 5
      app/src/main/java/io/legado/app/ui/rss/source/debug/RssSourceDebugActivity.kt
  32. 4
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt
  33. 4
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt
  34. 26
      app/src/main/java/io/legado/app/utils/ViewExtensions.kt
  35. 2
      app/src/main/res/layout/activity_audio_play.xml
  36. 4
      app/src/main/res/layout/activity_book_source_edit.xml
  37. 2
      app/src/main/res/layout/activity_main.xml
  38. 2
      app/src/main/res/layout/activity_replace_edit.xml
  39. 8
      app/src/main/res/layout/activity_rss_source_edit.xml
  40. 2
      app/src/main/res/layout/dialog_auto_read.xml
  41. 2
      app/src/main/res/layout/dialog_bookshelf_config.xml
  42. 2
      app/src/main/res/layout/dialog_custom_group.xml
  43. 2
      app/src/main/res/layout/dialog_progressbar_view.xml
  44. 6
      app/src/main/res/layout/dialog_read_aloud.xml
  45. 2
      app/src/main/res/layout/dialog_read_bg_text.xml
  46. 10
      app/src/main/res/layout/dialog_read_book_style.xml
  47. 2
      app/src/main/res/layout/item_arrange_book.xml
  48. 2
      app/src/main/res/layout/item_book_group_manage.xml
  49. 6
      app/src/main/res/layout/item_book_source.xml
  50. 2
      app/src/main/res/layout/item_download.xml
  51. 2
      app/src/main/res/layout/item_group_select.xml
  52. 2
      app/src/main/res/layout/item_http_tts.xml
  53. 2
      app/src/main/res/layout/item_import_book.xml
  54. 4
      app/src/main/res/layout/item_replace_rule.xml
  55. 4
      app/src/main/res/layout/item_rss_source.xml
  56. 2
      app/src/main/res/layout/item_source_import.xml
  57. 4
      app/src/main/res/layout/item_toc_regex.xml
  58. 2
      app/src/main/res/layout/view_detail_seek_bar.xml
  59. 2
      app/src/main/res/layout/view_read_menu.xml
  60. 2
      app/src/main/res/layout/view_select_action_bar.xml

@ -1,14 +1,6 @@
package io.legado.app.lib.theme
import android.graphics.drawable.GradientDrawable
import android.view.View
import android.widget.EdgeEffect
import android.widget.ScrollView
import androidx.annotation.ColorInt
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2
import com.google.android.material.bottomnavigation.BottomNavigationView
import io.legado.app.utils.ColorUtils
import io.legado.app.utils.dp
import splitties.init.appCtx
@ -18,66 +10,6 @@ import splitties.init.appCtx
@Suppress("unused", "MemberVisibilityCanBePrivate")
object ATH {
fun setEdgeEffectColor(view: RecyclerView?, @ColorInt color: Int) {
view?.edgeEffectFactory = object : RecyclerView.EdgeEffectFactory() {
override fun createEdgeEffect(view: RecyclerView, direction: Int): EdgeEffect {
val edgeEffect = super.createEdgeEffect(view, direction)
edgeEffect.color = color
return edgeEffect
}
}
}
fun setEdgeEffectColor(viewPager: ViewPager2?, @ColorInt color: Int) {
try {
val clazz = ViewPager2::class.java
for (name in arrayOf("mLeftEdge", "mRightEdge")) {
val field = clazz.getDeclaredField(name)
field.isAccessible = true
val edge = field.get(viewPager)
(edge as EdgeEffect).color = color
}
} catch (ignored: Exception) {
}
}
fun setEdgeEffectColor(scrollView: ScrollView?, @ColorInt color: Int) {
try {
val clazz = ScrollView::class.java
for (name in arrayOf("mEdgeGlowTop", "mEdgeGlowBottom")) {
val field = clazz.getDeclaredField(name)
field.isAccessible = true
val edge = field.get(scrollView)
(edge as EdgeEffect).color = color
}
} catch (ignored: Exception) {
}
}
//**************************************************************Directly*************************************************************//
fun applyBottomNavigationColor(bottomBar: BottomNavigationView) {
bottomBar.apply {
val bgColor = context.bottomBackground
setBackgroundColor(bgColor)
val textIsDark = ColorUtils.isColorLight(bgColor)
val textColor = context.getSecondaryTextColor(textIsDark)
val colorStateList = Selector.colorBuild()
.setDefaultColor(textColor)
.setSelectedColor(ThemeStore.accentColor(context)).create()
itemIconTintList = colorStateList
itemTextColor = colorStateList
}
}
fun applyEdgeEffectColor(view: View?) {
when (view) {
is RecyclerView -> view.edgeEffectFactory = DEFAULT_EFFECT_FACTORY
is ViewPager2 -> setEdgeEffectColor(view, ThemeStore.primaryColor(view.context))
is ScrollView -> setEdgeEffectColor(view, ThemeStore.primaryColor(view.context))
}
}
fun getDialogBackground(): GradientDrawable {
val background = GradientDrawable()
background.cornerRadius = 3F.dp
@ -85,11 +17,4 @@ object ATH {
return background
}
private val DEFAULT_EFFECT_FACTORY = object : RecyclerView.EdgeEffectFactory() {
override fun createEdgeEffect(view: RecyclerView, direction: Int): EdgeEffect {
val edgeEffect = super.createEdgeEffect(view, direction)
edgeEffect.color = ThemeStore.primaryColor(view.context)
return edgeEffect
}
}
}

@ -0,0 +1,27 @@
package io.legado.app.lib.theme.view
import android.content.Context
import android.util.AttributeSet
import com.google.android.material.bottomnavigation.BottomNavigationView
import io.legado.app.lib.theme.Selector
import io.legado.app.lib.theme.ThemeStore
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.lib.theme.getSecondaryTextColor
import io.legado.app.utils.ColorUtils
class ThemeBottomNavigationVIew(context: Context, attrs: AttributeSet) :
BottomNavigationView(context, attrs) {
init {
val bgColor = context.bottomBackground
setBackgroundColor(bgColor)
val textIsDark = ColorUtils.isColorLight(bgColor)
val textColor = context.getSecondaryTextColor(textIsDark)
val colorStateList = Selector.colorBuild()
.setDefaultColor(textColor)
.setSelectedColor(ThemeStore.accentColor(context)).create()
itemIconTintList = colorStateList
itemTextColor = colorStateList
}
}

@ -9,7 +9,7 @@ import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ATECheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) {
class ThemeCheckBox(context: Context, attrs: AttributeSet) : AppCompatCheckBox(context, attrs) {
init {
if (!isInEditMode) {

@ -9,7 +9,7 @@ import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ATEProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) {
class ThemeProgressBar(context: Context, attrs: AttributeSet) : ProgressBar(context, attrs) {
init {
if (!isInEditMode) {

@ -9,7 +9,8 @@ import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ATERadioButton(context: Context, attrs: AttributeSet) : AppCompatRadioButton(context, attrs) {
class ThemeRadioButton(context: Context, attrs: AttributeSet) :
AppCompatRadioButton(context, attrs) {
init {
if (!isInEditMode) {

@ -15,7 +15,7 @@ import io.legado.app.utils.getCompatColor
/**
* @author Aidan Follestad (afollestad)
*/
class ATERadioNoButton(context: Context, attrs: AttributeSet) :
class ThemeRadioNoButton(context: Context, attrs: AttributeSet) :
AppCompatRadioButton(context, attrs) {
private val isBottomBackground: Boolean

@ -9,7 +9,7 @@ import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ATESeekBar(context: Context, attrs: AttributeSet) : AppCompatSeekBar(context, attrs) {
class ThemeSeekBar(context: Context, attrs: AttributeSet) : AppCompatSeekBar(context, attrs) {
init {
if (!isInEditMode) {

@ -9,7 +9,7 @@ import io.legado.app.utils.applyTint
/**
* @author Aidan Follestad (afollestad)
*/
class ATESwitch(context: Context, attrs: AttributeSet) : SwitchCompat(context, attrs) {
class ThemeSwitch(context: Context, attrs: AttributeSet) : SwitchCompat(context, attrs) {
init {
if (!isInEditMode) {

@ -17,7 +17,7 @@ import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookGroup
import io.legado.app.databinding.ActivityArrangeBookBinding
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.book.group.GroupManageDialog
import io.legado.app.ui.book.group.GroupSelectDialog
import io.legado.app.ui.widget.SelectActionBar
@ -26,6 +26,7 @@ import io.legado.app.ui.widget.recycler.ItemTouchCallback
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.cnCompare
import io.legado.app.utils.getPrefInt
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Dispatchers.IO
@ -88,7 +89,7 @@ class ArrangeBookActivity : VMBaseActivity<ActivityArrangeBookBinding, ArrangeBo
}
private fun initView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.layoutManager = LinearLayoutManager(this)
binding.recyclerView.addItemDecoration(VerticalDivider(this))
binding.recyclerView.adapter = adapter

@ -13,8 +13,8 @@ import io.legado.app.base.BasePreferenceFragment
import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey
import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.lib.theme.primaryColor
import io.legado.app.model.ReadBook
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.ui.book.read.page.ReadView
@ -22,6 +22,7 @@ import io.legado.app.ui.book.read.page.provider.ChapterProvider
import io.legado.app.utils.dp
import io.legado.app.utils.getPrefBoolean
import io.legado.app.utils.postEvent
import io.legado.app.utils.setEdgeEffectColor
class MoreConfigDialog : DialogFragment() {
private val readPreferTag = "readPreferenceFragment"
@ -77,7 +78,7 @@ class MoreConfigDialog : DialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
}
override fun onResume() {

@ -16,8 +16,8 @@ import io.legado.app.constant.PreferKey
import io.legado.app.data.appDb
import io.legado.app.help.AppConfig
import io.legado.app.lib.dialogs.SelectItem
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.model.ReadAloud
import io.legado.app.service.BaseReadAloudService
import io.legado.app.utils.*
@ -80,7 +80,7 @@ class ReadAloudConfigDialog : DialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
}
override fun onResume() {

@ -25,7 +25,6 @@ import io.legado.app.help.DirectLinkUpload
import io.legado.app.lib.dialogs.SelectItem
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.selector
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.model.ReadAloud
import io.legado.app.ui.document.HandleFileContract
@ -90,7 +89,7 @@ class SpeakEngineDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener
private fun initView() = binding.run {
toolBar.setBackgroundColor(primaryColor)
toolBar.setTitle(R.string.speak_engine)
ATH.applyEdgeEffectColor(recyclerView)
recyclerView.setEdgeEffectColor(primaryColor)
recyclerView.layoutManager = LinearLayoutManager(requireContext())
recyclerView.adapter = adapter
tvFooterLeft.setText(R.string.system_tts)

@ -140,9 +140,9 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
ATH.applyEdgeEffectColor(binding.rvBookshelfSearch)
ATH.applyEdgeEffectColor(binding.rvHistoryKey)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.rvBookshelfSearch.setEdgeEffectColor(primaryColor)
binding.rvHistoryKey.setEdgeEffectColor(primaryColor)
binding.rvBookshelfSearch.layoutManager = FlexboxLayoutManager(this)
binding.rvBookshelfSearch.adapter = bookAdapter
binding.rvHistoryKey.layoutManager = FlexboxLayoutManager(this)

@ -10,10 +10,11 @@ import androidx.appcompat.widget.SearchView
import io.legado.app.R
import io.legado.app.base.VMBaseActivity
import io.legado.app.databinding.ActivitySourceDebugBinding
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.qrcode.QrCodeResult
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.toastOnUi
import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -52,7 +53,7 @@ class BookSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, BookS
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.adapter = adapter
binding.rotateLoading.loadingColor = accentColor
}

@ -22,8 +22,8 @@ import io.legado.app.databinding.ActivityBookSourceEditBinding
import io.legado.app.help.LocalConfig
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.selector
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.book.source.debug.BookSourceDebugActivity
import io.legado.app.ui.document.HandleFileContract
import io.legado.app.ui.login.SourceLoginActivity
@ -130,7 +130,7 @@ class BookSourceEditActivity :
}
private fun initView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
mSoftKeyboardTool = KeyboardToolPop(this, AppConst.keyboardToolChars, this)
window.decorView.viewTreeObserver.addOnGlobalLayoutListener(KeyboardOnGlobalChangeListener())
binding.recyclerView.layoutManager = LinearLayoutManager(this)

@ -23,7 +23,7 @@ import io.legado.app.databinding.DialogEditTextBinding
import io.legado.app.help.DirectLinkUpload
import io.legado.app.help.LocalConfig
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.model.CheckSource
import io.legado.app.model.Debug
@ -183,7 +183,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.addItemDecoration(VerticalDivider(this))
binding.recyclerView.adapter = adapter
// When this page is opened, it is in selection mode

@ -11,8 +11,9 @@ import io.legado.app.base.VMBaseFragment
import io.legado.app.data.appDb
import io.legado.app.data.entities.Bookmark
import io.legado.app.databinding.FragmentBookmarkBinding
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Job
@ -37,7 +38,7 @@ class BookmarkFragment : VMBaseFragment<TocViewModel>(R.layout.fragment_bookmark
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.layoutManager = LinearLayoutManager(requireContext())
binding.recyclerView.addItemDecoration(VerticalDivider(requireContext()))
binding.recyclerView.adapter = adapter

@ -26,8 +26,8 @@ import io.legado.app.help.storage.Restore
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.permission.Permissions
import io.legado.app.lib.permission.PermissionsCompat
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.document.HandleFileContract
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.*
@ -124,7 +124,7 @@ class BackupConfigFragment : BasePreferenceFragment(),
super.onViewCreated(view, savedInstanceState)
activity?.setTitle(R.string.backup_restore)
preferenceManager.sharedPreferences.registerOnSharedPreferenceChangeListener(this)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
setHasOptionsMenu(true)
if (!LocalConfig.backupHelpVersionIsLast) {
showHelp()

@ -10,7 +10,7 @@ import io.legado.app.R
import io.legado.app.base.BasePreferenceFragment
import io.legado.app.constant.PreferKey
import io.legado.app.lib.dialogs.selector
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.model.BookCover
import io.legado.app.ui.widget.prefs.SwitchPreference
import io.legado.app.utils.*
@ -41,7 +41,7 @@ class CoverConfigFragment : BasePreferenceFragment(),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
activity?.setTitle(R.string.cover_config)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
setHasOptionsMenu(true)
}

@ -18,7 +18,7 @@ import io.legado.app.databinding.DialogEditTextBinding
import io.legado.app.help.AppConfig
import io.legado.app.help.BookHelp
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.receiver.SharedReceiverActivity
import io.legado.app.service.WebService
import io.legado.app.ui.main.MainActivity
@ -50,7 +50,7 @@ class OtherConfigFragment : BasePreferenceFragment(),
super.onViewCreated(view, savedInstanceState)
activity?.setTitle(R.string.other_setting)
preferenceManager.sharedPreferences.registerOnSharedPreferenceChangeListener(this)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
}
override fun onDestroy() {

@ -23,7 +23,7 @@ import io.legado.app.help.LauncherIconHelp
import io.legado.app.help.ThemeConfig
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.selector
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.number.NumberPickerDialog
import io.legado.app.ui.widget.prefs.ColorPreference
import io.legado.app.ui.widget.seekbar.SeekBarChangeListener
@ -81,7 +81,7 @@ class ThemeConfigFragment : BasePreferenceFragment(),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
activity?.setTitle(R.string.theme_setting)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
setHasOptionsMenu(true)
}

@ -23,8 +23,8 @@ import io.legado.app.help.AppConfig
import io.legado.app.help.BookHelp
import io.legado.app.help.LocalConfig
import io.legado.app.help.storage.Backup
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.elevation
import io.legado.app.lib.theme.primaryColor
import io.legado.app.service.BaseReadAloudService
import io.legado.app.ui.main.bookshelf.BaseBookshelfFragment
import io.legado.app.ui.main.bookshelf.style1.BookshelfFragment1
@ -34,6 +34,7 @@ import io.legado.app.ui.main.my.MyFragment
import io.legado.app.ui.main.rss.RssFragment
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.observeEvent
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.toastOnUi
import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -56,8 +57,7 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
override fun onActivityCreated(savedInstanceState: Bundle?) {
upBottomMenu()
binding.apply {
ATH.applyEdgeEffectColor(viewPagerMain)
ATH.applyBottomNavigationColor(bottomNavigationView)
viewPagerMain.setEdgeEffectColor(primaryColor)
viewPagerMain.offscreenPageLimit = 3
viewPagerMain.adapter = TabFragmentPageAdapter(supportFragmentManager)
viewPagerMain.addOnPageChangeListener(PageChangeCallback())

@ -17,13 +17,14 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookGroup
import io.legado.app.databinding.FragmentBookshelfBinding
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.book.search.SearchActivity
import io.legado.app.ui.main.bookshelf.BaseBookshelfFragment
import io.legado.app.ui.main.bookshelf.style1.books.BooksFragment
import io.legado.app.utils.getPrefInt
import io.legado.app.utils.putPrefInt
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.toastOnUi
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.flow.collect
@ -62,7 +63,7 @@ class BookshelfFragment1 : BaseBookshelfFragment(R.layout.fragment_bookshelf),
get() = bookGroups[tabLayout.selectedTabPosition]
private fun initView() {
ATH.applyEdgeEffectColor(binding.viewPagerBookshelf)
binding.viewPagerBookshelf.setEdgeEffectColor(primaryColor)
tabLayout.isTabIndicatorFullWidth = false
tabLayout.tabMode = TabLayout.MODE_SCROLLABLE
tabLayout.setSelectedTabIndicatorColor(requireContext().accentColor)

@ -18,16 +18,13 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.Book
import io.legado.app.databinding.FragmentBooksBinding
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.book.audio.AudioPlayActivity
import io.legado.app.ui.book.info.BookInfoActivity
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.ui.main.MainViewModel
import io.legado.app.utils.cnCompare
import io.legado.app.utils.getPrefInt
import io.legado.app.utils.observeEvent
import io.legado.app.utils.startActivity
import io.legado.app.utils.*
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.collect
@ -65,7 +62,7 @@ class BooksFragment() : BaseFragment(R.layout.fragment_books),
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.rvBookshelf)
binding.rvBookshelf.setEdgeEffectColor(primaryColor)
binding.refreshLayout.setColorSchemeColors(accentColor)
binding.refreshLayout.setOnRefreshListener {
binding.refreshLayout.isRefreshing = false

@ -18,8 +18,8 @@ import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookGroup
import io.legado.app.databinding.FragmentBookshelf1Binding
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.book.audio.AudioPlayActivity
import io.legado.app.ui.book.group.GroupEditDialog
import io.legado.app.ui.book.info.BookInfoActivity
@ -55,7 +55,7 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1),
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.rvBookshelf)
binding.rvBookshelf.setEdgeEffectColor(primaryColor)
binding.refreshLayout.setColorSchemeColors(accentColor)
binding.refreshLayout.setOnRefreshListener {
binding.refreshLayout.isRefreshing = false

@ -19,14 +19,11 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.BookSource
import io.legado.app.databinding.FragmentExploreBinding
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.book.explore.ExploreShowActivity
import io.legado.app.ui.book.source.edit.BookSourceEditActivity
import io.legado.app.utils.applyTint
import io.legado.app.utils.cnCompare
import io.legado.app.utils.splitNotBlank
import io.legado.app.utils.startActivity
import io.legado.app.utils.*
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.collect
@ -87,7 +84,7 @@ class ExploreFragment : VMBaseFragment<ExploreViewModel>(R.layout.fragment_explo
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.rvFind)
binding.rvFind.setEdgeEffectColor(primaryColor)
binding.rvFind.layoutManager = linearLayoutManager
binding.rvFind.adapter = adapter
adapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {

@ -14,7 +14,7 @@ import io.legado.app.constant.PreferKey
import io.legado.app.databinding.FragmentMyConfigBinding
import io.legado.app.help.AppConfig
import io.legado.app.help.ThemeConfig
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.service.WebService
import io.legado.app.ui.about.AboutActivity
import io.legado.app.ui.about.DonateActivity
@ -89,7 +89,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
ATH.applyEdgeEffectColor(listView)
listView.setEdgeEffectColor(primaryColor)
}
override fun onResume() {

@ -14,7 +14,7 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.RssSource
import io.legado.app.databinding.FragmentRssBinding
import io.legado.app.databinding.ItemRssBinding
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.rss.article.RssSortActivity
import io.legado.app.ui.rss.favorites.RssFavoritesActivity
@ -103,7 +103,7 @@ class RssFragment : VMBaseFragment<RssSourceViewModel>(R.layout.fragment_rss),
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.adapter = adapter
adapter.addHeaderView {
ItemRssBinding.inflate(layoutInflater, it, false).apply {

@ -23,7 +23,7 @@ import io.legado.app.help.ContentProcessor
import io.legado.app.help.DirectLinkUpload
import io.legado.app.help.coroutine.Coroutine
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.association.ImportReplaceRuleDialog
import io.legado.app.ui.document.HandleFileContract
@ -121,7 +121,7 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.layoutManager = LinearLayoutManager(this)
binding.recyclerView.adapter = adapter
binding.recyclerView.addItemDecoration(VerticalDivider(this))

@ -15,11 +15,12 @@ import io.legado.app.data.appDb
import io.legado.app.data.entities.RssArticle
import io.legado.app.databinding.FragmentRssArticlesBinding
import io.legado.app.databinding.ViewLoadMoreBinding
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.rss.read.ReadRssActivity
import io.legado.app.ui.widget.recycler.LoadMoreView
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.startActivity
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Job
@ -61,7 +62,7 @@ class RssArticlesFragment() : VMBaseFragment<RssArticlesViewModel>(R.layout.frag
private fun initView() = binding.run {
refreshLayout.setColorSchemeColors(accentColor)
ATH.applyEdgeEffectColor(recyclerView)
recyclerView.setEdgeEffectColor(primaryColor)
recyclerView.layoutManager = if (activityViewModel.isGridLayout) {
recyclerView.setPadding(8, 0, 8, 0)
GridLayoutManager(requireContext(), 2)

@ -8,10 +8,11 @@ import androidx.activity.viewModels
import io.legado.app.R
import io.legado.app.base.VMBaseActivity
import io.legado.app.databinding.ActivitySourceDebugBinding
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.gone
import io.legado.app.utils.setEdgeEffectColor
import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.toastOnUi
import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -55,7 +56,7 @@ class RssSourceDebugActivity : VMBaseActivity<ActivitySourceDebugBinding, RssSou
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.adapter = adapter
binding.rotateLoading.loadingColor = accentColor
}

@ -19,7 +19,7 @@ import io.legado.app.databinding.ActivityRssSourceEditBinding
import io.legado.app.help.LocalConfig
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.dialogs.selector
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.ui.qrcode.QrCodeResult
import io.legado.app.ui.rss.source.debug.RssSourceDebugActivity
import io.legado.app.ui.widget.KeyboardToolPop
@ -123,7 +123,7 @@ class RssSourceEditActivity :
}
private fun initView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
mSoftKeyboardTool = KeyboardToolPop(this, AppConst.keyboardToolChars, this)
window.decorView.viewTreeObserver.addOnGlobalLayoutListener(this)
binding.recyclerView.adapter = adapter

@ -19,7 +19,7 @@ import io.legado.app.databinding.ActivityRssSourceBinding
import io.legado.app.databinding.DialogEditTextBinding
import io.legado.app.help.DirectLinkUpload
import io.legado.app.lib.dialogs.alert
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.ui.association.ImportRssSourceDialog
import io.legado.app.ui.document.HandleFileContract
@ -149,7 +149,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
}
private fun initRecyclerView() {
ATH.applyEdgeEffectColor(binding.recyclerView)
binding.recyclerView.setEdgeEffectColor(primaryColor)
binding.recyclerView.addItemDecoration(VerticalDivider(this))
binding.recyclerView.adapter = adapter
// When this page is opened, it is in selection mode

@ -9,6 +9,7 @@ import android.text.Html
import android.view.View
import android.view.View.*
import android.view.inputmethod.InputMethodManager
import android.widget.EdgeEffect
import android.widget.RadioGroup
import android.widget.SeekBar
import android.widget.TextView
@ -17,6 +18,8 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.view.menu.MenuPopupHelper
import androidx.appcompat.widget.PopupMenu
import androidx.core.view.get
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.ViewPager
import io.legado.app.help.AppConfig
import io.legado.app.lib.theme.TintHelper
import splitties.init.appCtx
@ -64,6 +67,29 @@ fun View.applyBackgroundTint(
}
}
fun RecyclerView.setEdgeEffectColor(@ColorInt color: Int) {
edgeEffectFactory = object : RecyclerView.EdgeEffectFactory() {
override fun createEdgeEffect(view: RecyclerView, direction: Int): EdgeEffect {
val edgeEffect = super.createEdgeEffect(view, direction)
edgeEffect.color = color
return edgeEffect
}
}
}
fun ViewPager.setEdgeEffectColor(@ColorInt color: Int) {
try {
val clazz = ViewPager::class.java
for (name in arrayOf("mLeftEdge", "mRightEdge")) {
val field = clazz.getDeclaredField(name)
field.isAccessible = true
val edge = field.get(this)
(edge as EdgeEffect).color = color
}
} catch (ignored: Exception) {
}
}
fun View.gone() {
if (visibility != GONE) {
visibility = GONE

@ -84,7 +84,7 @@
android:textColor="@color/md_white_1000"
tools:ignore="HardcodedText,RtlSymmetry" />
<io.legado.app.lib.theme.view.ATESeekBar
<io.legado.app.lib.theme.view.ThemeSeekBar
android:id="@+id/player_progress"
android:layout_width="0dp"
android:layout_height="25dp"

@ -19,14 +19,14 @@
android:orientation="horizontal"
android:layout_gravity="center_vertical">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_is_enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/is_enable" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_is_enable_find"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

@ -13,7 +13,7 @@
android:layout_weight="1"
tools:ignore="SpeakableTextPresentCheck" />
<com.google.android.material.bottomnavigation.BottomNavigationView
<io.legado.app.lib.theme.view.ThemeBottomNavigationVIew
android:id="@+id/bottom_navigation_view"
android:layout_width="match_parent"
android:layout_height="50dp"

@ -72,7 +72,7 @@
android:orientation="horizontal"
android:gravity="center_vertical">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_use_regex"
android:layout_width="0dp"
android:layout_height="wrap_content"

@ -29,7 +29,7 @@
android:text="source:"
tools:ignore="HardcodedText,RtlHardcoded" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_is_enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -37,7 +37,7 @@
android:text="@string/is_enable"
tools:ignore="TouchTargetSizeCheck" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_single_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -61,7 +61,7 @@
android:text="WebView:"
tools:ignore="HardcodedText,RtlHardcoded" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_enable_js"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -69,7 +69,7 @@
android:text="@string/enable_js"
tools:ignore="TouchTargetSizeCheck" />
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_enable_base_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

@ -41,7 +41,7 @@
</LinearLayout>
<io.legado.app.lib.theme.view.ATESeekBar
<io.legado.app.lib.theme.view.ThemeSeekBar
android:id="@+id/seek_auto_read"
android:layout_width="match_parent"
android:layout_height="wrap_content"

@ -31,7 +31,7 @@
</LinearLayout>
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_show_unread"
android:layout_width="match_parent"
android:layout_height="wrap_content"

@ -40,7 +40,7 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/sw_add_group" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_add_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<io.legado.app.lib.theme.view.ATEProgressBar
<io.legado.app.lib.theme.view.ThemeProgressBar
android:id="@+id/ck_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"

@ -130,7 +130,7 @@
android:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<io.legado.app.lib.theme.view.ATESeekBar
<io.legado.app.lib.theme.view.ThemeSeekBar
android:id="@+id/seek_timer"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -168,7 +168,7 @@
android:textColor="@color/primaryText"
android:textSize="14sp" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/cb_tts_follow_sys"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -179,7 +179,7 @@
</LinearLayout>
<io.legado.app.lib.theme.view.ATESeekBar
<io.legado.app.lib.theme.view.ThemeSeekBar
android:id="@+id/seek_tts_SpeechRate"
android:layout_width="match_parent"
android:layout_height="wrap_content"

@ -54,7 +54,7 @@
</LinearLayout>
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_dark_status_icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"

@ -200,7 +200,7 @@
android:orientation="horizontal"
android:gravity="center">
<io.legado.app.lib.theme.view.ATERadioNoButton
<io.legado.app.lib.theme.view.ThemeRadioNoButton
android:id="@+id/rb_anim0"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -213,7 +213,7 @@
android:text="@string/page_anim_cover"
app:isBottomBackground="true" />
<io.legado.app.lib.theme.view.ATERadioNoButton
<io.legado.app.lib.theme.view.ThemeRadioNoButton
android:id="@+id/rb_anim1"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -226,7 +226,7 @@
android:text="@string/page_anim_slide"
app:isBottomBackground="true" />
<io.legado.app.lib.theme.view.ATERadioNoButton
<io.legado.app.lib.theme.view.ThemeRadioNoButton
android:id="@+id/rb_simulation_anim"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -239,7 +239,7 @@
android:text="@string/page_anim_simulation"
app:isBottomBackground="true" />
<io.legado.app.lib.theme.view.ATERadioNoButton
<io.legado.app.lib.theme.view.ThemeRadioNoButton
android:id="@+id/rb_scroll_anim"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -252,7 +252,7 @@
android:text="@string/page_anim_scroll"
app:isBottomBackground="true" />
<io.legado.app.lib.theme.view.ATERadioNoButton
<io.legado.app.lib.theme.view.ThemeRadioNoButton
android:id="@+id/rb_no_anim"
android:layout_width="0dp"
android:layout_height="wrap_content"

@ -6,7 +6,7 @@
android:layout_height="wrap_content"
android:padding="6dp">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

@ -25,7 +25,7 @@
android:text="@string/edit"
android:textColor="@color/secondaryText" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

@ -7,7 +7,7 @@
android:background="?android:attr/selectableItemBackground"
android:padding="16dp">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_book_source"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -21,7 +21,7 @@
tools:ignore="TouchTargetSizeCheck"
tools:text="@string/book_source" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/swt_enabled"
android:name="@string/enable"
android:layout_width="wrap_content"
@ -83,7 +83,7 @@
tools:text="@string/debug_hint"
tools:visibility="visible" />
<io.legado.app.lib.theme.view.ATEProgressBar
<io.legado.app.lib.theme.view.ThemeProgressBar
android:id="@+id/iv_progressBar"
android:layout_width="25dp"
android:layout_height="25dp"

@ -72,7 +72,7 @@
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/tv_download" />
<io.legado.app.lib.theme.view.ATEProgressBar
<io.legado.app.lib.theme.view.ThemeProgressBar
android:id="@+id/progress_export"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"

@ -7,7 +7,7 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_group"
android:layout_width="0dp"
android:layout_height="wrap_content"

@ -7,7 +7,7 @@
android:orientation="horizontal"
android:padding="8dp">
<io.legado.app.lib.theme.view.ATERadioButton
<io.legado.app.lib.theme.view.ThemeRadioButton
android:id="@+id/cb_name"
android:layout_width="0dp"
android:layout_height="wrap_content"

@ -12,7 +12,7 @@
android:layout_width="60dp"
android:layout_height="match_parent">
<!--选择是否添加文件-->
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

@ -7,14 +7,14 @@
android:orientation="horizontal"
android:padding="8dp">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tools:ignore="RtlSymmetry" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/swt_enabled"
android:name="@string/enable"
android:layout_width="wrap_content"

@ -8,7 +8,7 @@
android:orientation="horizontal"
android:padding="16dp">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_source"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -17,7 +17,7 @@
android:singleLine="true"
android:textColor="@color/primaryText" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/swt_enabled"
android:name="@string/enable"
android:layout_width="wrap_content"

@ -6,7 +6,7 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_source_name"
android:layout_width="0dp"
android:layout_height="wrap_content"

@ -7,14 +7,14 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<io.legado.app.lib.theme.view.ATERadioButton
<io.legado.app.lib.theme.view.ThemeRadioButton
android:id="@+id/rb_regex_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1" />
<io.legado.app.lib.theme.view.ATESwitch
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/swt_enabled"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

@ -24,7 +24,7 @@
android:background="?android:attr/selectableItemBackgroundBorderless"
android:tint="@color/primaryText" />
<io.legado.app.lib.theme.view.ATESeekBar
<io.legado.app.lib.theme.view.ThemeSeekBar
android:id="@+id/seek_bar"
android:layout_width="0dp"
android:layout_height="25dp"

@ -275,7 +275,7 @@
android:textSize="14sp"
tools:ignore="TouchTargetSizeCheck" />
<io.legado.app.lib.theme.view.ATESeekBar
<io.legado.app.lib.theme.view.ThemeSeekBar
android:id="@+id/seek_read_page"
android:layout_width="0dp"
android:layout_height="25dp"

@ -13,7 +13,7 @@
android:paddingBottom="6dp"
tools:ignore="RtlHardcoded">
<io.legado.app.lib.theme.view.ATECheckBox
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_selected_all"
android:layout_width="0dp"
android:layout_height="wrap_content"

Loading…
Cancel
Save