优化主题

pull/310/head
gedoor 4 years ago
parent 5ca08c153e
commit 523bb55c6d
  1. 12
      app/src/main/java/io/legado/app/App.kt
  2. 11
      app/src/main/java/io/legado/app/lib/theme/ATH.kt
  3. 2
      app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt
  4. 2
      app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListAdapter.kt
  5. 9
      app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListFragment.kt
  6. 2
      app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt
  7. 37
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  8. 2
      app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt
  9. 2
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt
  10. 23
      app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt
  11. 16
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt
  12. 24
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt
  13. 2
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt
  14. 9
      app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt
  15. 4
      app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt
  16. 1
      app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt
  17. 4
      app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt
  18. 2
      app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt
  19. 8
      app/src/main/java/io/legado/app/ui/widget/text/StrokeTextView.kt
  20. 4
      app/src/main/java/io/legado/app/utils/MenuExtensions.kt
  21. 2
      app/src/main/java/io/legado/app/utils/UIUtils.kt
  22. 2
      app/src/main/res/color/selector_image.xml
  23. 2
      app/src/main/res/drawable/selector_btn_accent_bg.xml
  24. 2
      app/src/main/res/drawable/shape_radius_10dp.xml
  25. 2
      app/src/main/res/drawable/shape_radius_1dp.xml
  26. 6
      app/src/main/res/layout-land/activity_book_info.xml
  27. 2
      app/src/main/res/layout/activity_audio_play.xml
  28. 6
      app/src/main/res/layout/activity_book_info.xml
  29. 2
      app/src/main/res/layout/activity_import_book.xml
  30. 6
      app/src/main/res/layout/activity_qrcode_capture.xml
  31. 2
      app/src/main/res/layout/activity_welcome.xml
  32. 18
      app/src/main/res/layout/dialog_auto_read.xml
  33. 8
      app/src/main/res/layout/dialog_download_choice.xml
  34. 2
      app/src/main/res/layout/dialog_page_key.xml
  35. 32
      app/src/main/res/layout/dialog_read_aloud.xml
  36. 10
      app/src/main/res/layout/dialog_read_book_style.xml
  37. 6
      app/src/main/res/layout/fragment_chapter_list.xml
  38. 2
      app/src/main/res/layout/item_arrange_book.xml
  39. 6
      app/src/main/res/layout/item_book_source.xml
  40. 2
      app/src/main/res/layout/item_bookshelf_grid.xml
  41. 2
      app/src/main/res/layout/item_bookshelf_list.xml
  42. 4
      app/src/main/res/layout/item_change_source.xml
  43. 2
      app/src/main/res/layout/item_cover.xml
  44. 2
      app/src/main/res/layout/item_download.xml
  45. 2
      app/src/main/res/layout/item_fillet_text.xml
  46. 5
      app/src/main/res/layout/item_find_book.xml
  47. 4
      app/src/main/res/layout/item_font.xml
  48. 2
      app/src/main/res/layout/item_group_select.xml
  49. 2
      app/src/main/res/layout/item_import_book.xml
  50. 4
      app/src/main/res/layout/item_replace_rule.xml
  51. 2
      app/src/main/res/layout/item_rss_article.xml
  52. 2
      app/src/main/res/layout/item_rss_article_1.xml
  53. 2
      app/src/main/res/layout/item_rss_article_2.xml
  54. 6
      app/src/main/res/layout/item_rss_source.xml
  55. 8
      app/src/main/res/layout/item_search.xml
  56. 2
      app/src/main/res/layout/item_text.xml
  57. 4
      app/src/main/res/layout/item_toc_regex.xml
  58. 2
      app/src/main/res/layout/popup_action_menu.xml
  59. 4
      app/src/main/res/layout/view_detail_seek_bar.xml
  60. 2
      app/src/main/res/layout/view_error.xml
  61. 2
      app/src/main/res/layout/view_preference.xml
  62. 2
      app/src/main/res/layout/view_preference_category.xml
  63. 34
      app/src/main/res/layout/view_read_menu.xml
  64. 5
      app/src/main/res/layout/view_select_action_bar.xml
  65. 10
      app/src/main/res/values-night/colors.xml
  66. 10
      app/src/main/res/values/colors.xml
  67. 6
      app/src/main/res/values/styles.xml

@ -92,12 +92,8 @@ class App : MultiDexApplication() {
background = getCompatColor(R.color.md_grey_900)
putPrefInt(PreferKey.cNBackground, background)
}
var bBackground =
val bBackground =
getPrefInt(PreferKey.cNBBackground, getCompatColor(R.color.md_grey_850))
if (ColorUtils.isColorLight(bBackground)) {
bBackground = getCompatColor(R.color.md_grey_850)
putPrefInt(PreferKey.cNBBackground, bBackground)
}
ThemeStore.editTheme(this)
.coloredNavigationBar(true)
.primaryColor(ColorUtils.withAlpha(primary, 1f))
@ -117,12 +113,8 @@ class App : MultiDexApplication() {
background = getCompatColor(R.color.md_grey_100)
putPrefInt(PreferKey.cBackground, background)
}
var bBackground =
val bBackground =
getPrefInt(PreferKey.cBBackground, getCompatColor(R.color.md_grey_200))
if (!ColorUtils.isColorLight(bBackground)) {
bBackground = getCompatColor(R.color.md_grey_200)
putPrefInt(PreferKey.cBBackground, bBackground)
}
ThemeStore.editTheme(this)
.coloredNavigationBar(true)
.primaryColor(ColorUtils.withAlpha(primary, 1f))

@ -197,11 +197,14 @@ object ATH {
//**************************************************************Directly*************************************************************//
fun applyBottomNavigationColor(bottomBar: BottomNavigationView?) {
bottomBar?.apply {
setBackgroundColor(ThemeStore.bottomBackground(context))
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(context.getCompatColor(R.color.btn_bg_press_tp))
.setDefaultColor(textColor)
.setSelectedColor(ThemeStore.accentColor(bottom_navigation_view.context)).create()
itemIconTintList = colorStateList
itemTextColor = colorStateList

@ -21,7 +21,7 @@ class ATERadioNoButton(context: Context, attrs: AttributeSet) :
.setStrokeWidth(2.dp)
.setCheckedBgColor(ThemeStore.accentColor(context))
.setCheckedStrokeColor(ThemeStore.accentColor(context))
.setDefaultStrokeColor(context.getCompatColor(R.color.tv_text_default))
.setDefaultStrokeColor(context.getCompatColor(R.color.primaryText))
.create()
}
}

@ -25,7 +25,7 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
if (callback.durChapterIndex() == item.index) {
tv_chapter_name.setTextColor(context.accentColor)
} else {
tv_chapter_name.setTextColor(context.getCompatColor(R.color.tv_text_default))
tv_chapter_name.setTextColor(context.getCompatColor(R.color.primaryText))
}
tv_chapter_name.text = item.title
if (!item.tag.isNullOrEmpty()) {

@ -15,8 +15,10 @@ import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter
import io.legado.app.help.BookHelp
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.lib.theme.getPrimaryTextColor
import io.legado.app.ui.widget.recycler.UpLinearLayoutManager
import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.ColorUtils
import io.legado.app.utils.getViewModelOfActivity
import io.legado.app.utils.observeEvent
import kotlinx.android.synthetic.main.fragment_chapter_list.*
@ -40,6 +42,12 @@ class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragme
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
viewModel.chapterCallBack = this
val bbg = bottomBackground
val btc = requireContext().getPrimaryTextColor(ColorUtils.isColorLight(bbg))
ll_chapter_base_info.setBackgroundColor(bbg)
tv_current_chapter_info.setTextColor(btc)
iv_chapter_top.setColorFilter(btc)
iv_chapter_bottom.setColorFilter(btc)
initRecyclerView()
initView()
initBook()
@ -54,7 +62,6 @@ class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragme
}
private fun initView() {
ll_chapter_base_info.setBackgroundColor(bottomBackground)
iv_chapter_top.onClick { mLayoutManager.scrollToPositionWithOffset(0, 0) }
iv_chapter_bottom.onClick {
if (adapter.itemCount > 0) {

@ -19,7 +19,7 @@ class ChapterListAdapter(context: Context, var callBack: CallBack) :
if (item.index == callBack.durChapterIndex()) {
tv_chapter_name.setTextColor(context.accentColor)
} else {
tv_chapter_name.textColorResource = R.color.tv_text_secondary
tv_chapter_name.textColorResource = R.color.secondaryText
}
}

@ -15,10 +15,7 @@ import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey
import io.legado.app.help.AppConfig
import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.Selector
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.lib.theme.buttonDisabledColor
import io.legado.app.lib.theme.*
import io.legado.app.service.help.ReadBook
import io.legado.app.utils.*
import kotlinx.android.synthetic.main.view_read_menu.view.*
@ -32,6 +29,8 @@ class ReadMenu : FrameLayout {
private lateinit var menuTopOut: Animation
private lateinit var menuBottomIn: Animation
private lateinit var menuBottomOut: Animation
private val bgColor: Int
private val textColor: Int
private var bottomBackgroundList: ColorStateList
private var onMenuOutEnd: (() -> Unit)? = null
val showBrightnessView get() = context.getPrefBoolean(PreferKey.showBrightnessView, true)
@ -48,9 +47,11 @@ class ReadMenu : FrameLayout {
init {
callBack = activity as? CallBack
bgColor = context.bottomBackground
textColor = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor))
bottomBackgroundList = Selector.colorBuild()
.setDefaultColor(context.bottomBackground)
.setPressedColor(ColorUtils.darkenColor(context.bottomBackground))
.setDefaultColor(bgColor)
.setPressedColor(ColorUtils.darkenColor(bgColor))
.create()
inflate(context, R.layout.view_read_menu, this)
if (AppConfig.isNightTheme) {
@ -61,9 +62,25 @@ class ReadMenu : FrameLayout {
initAnimation()
val brightnessBackground = GradientDrawable()
brightnessBackground.cornerRadius = 5F.dp
brightnessBackground.setColor(ColorUtils.adjustAlpha(App.INSTANCE.bottomBackground, 0.5f))
brightnessBackground.setColor(ColorUtils.adjustAlpha(bgColor, 0.5f))
ll_brightness.background = brightnessBackground
ll_bottom_bg.setBackgroundColor(context.bottomBackground)
ll_bottom_bg.setBackgroundColor(bgColor)
fabAutoPage.backgroundTintList = bottomBackgroundList
fabAutoPage.setColorFilter(textColor)
fabReplaceRule.backgroundTintList = bottomBackgroundList
fabReplaceRule.setColorFilter(textColor)
fabNightTheme.backgroundTintList = bottomBackgroundList
fabNightTheme.setColorFilter(textColor)
tv_pre.setTextColor(textColor)
tv_next.setTextColor(textColor)
iv_catalog.setColorFilter(textColor)
tv_catalog.setTextColor(textColor)
iv_read_aloud.setColorFilter(textColor)
tv_read_aloud.setTextColor(textColor)
iv_font.setColorFilter(textColor)
tv_font.setTextColor(textColor)
iv_setting.setColorFilter(textColor)
tv_setting.setTextColor(textColor)
vw_bg.onClick { }
vwNavigationBar.onClick { }
seek_brightness.progress = context.getPrefInt("brightness", 100)
@ -154,7 +171,6 @@ class ReadMenu : FrameLayout {
})
//自动翻页
fabAutoPage.backgroundTintList = bottomBackgroundList
fabAutoPage.onClick {
runMenuOut {
callBack?.autoPage()
@ -162,11 +178,9 @@ class ReadMenu : FrameLayout {
}
//替换
fabReplaceRule.backgroundTintList = bottomBackgroundList
fabReplaceRule.onClick { callBack?.openReplaceRule() }
//夜间模式
fabNightTheme.backgroundTintList = bottomBackgroundList
fabNightTheme.onClick {
AppConfig.isNightTheme = !AppConfig.isNightTheme
App.INSTANCE.applyDayNight()
@ -268,6 +282,7 @@ class ReadMenu : FrameLayout {
fabAutoPage.setImageResource(R.drawable.ic_auto_page)
fabAutoPage.contentDescription = context.getString(R.string.auto_next_page)
}
fabAutoPage.setColorFilter(textColor)
}
interface CallBack {

@ -91,7 +91,7 @@ class BgTextConfigDialog : BaseDialogFragment() {
adapter.addHeaderView(headerView)
headerView.tv_name.text = getString(R.string.select_image)
headerView.iv_bg.setImageResource(R.drawable.ic_image)
headerView.iv_bg.setColorFilter(getCompatColor(R.color.tv_text_default))
headerView.iv_bg.setColorFilter(getCompatColor(R.color.primaryText))
headerView.onClick { selectImage() }
requireContext().assets.list("bg/")?.let {
adapter.setItems(it.toList())

@ -1,5 +1,6 @@
package io.legado.app.ui.book.read.config
import android.annotation.SuppressLint
import android.content.SharedPreferences
import android.os.Bundle
import android.util.DisplayMetrics
@ -67,6 +68,7 @@ class MoreConfigDialog : DialogFragment() {
class ReadPreferenceFragment : BasePreferenceFragment(),
SharedPreferences.OnSharedPreferenceChangeListener {
@SuppressLint("RestrictedApi")
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.pref_config_read)
}

@ -1,16 +1,14 @@
package io.legado.app.ui.book.read.config
import android.annotation.SuppressLint
import android.content.Context
import android.content.DialogInterface
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.*
import androidx.core.view.get
import androidx.fragment.app.DialogFragment
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey
import io.legado.app.help.AppConfig
@ -31,7 +29,7 @@ import org.jetbrains.anko.sdk27.listeners.onCheckedChange
import org.jetbrains.anko.sdk27.listeners.onClick
import org.jetbrains.anko.sdk27.listeners.onLongClick
class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack {
class ReadStyleDialog : BaseDialogFragment(), FontSelectDialog.CallBack {
val callBack get() = activity as? ReadBookActivity
@ -53,6 +51,16 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack {
}
}
override fun onAttach(context: Context) {
val bg = requireContext().bottomBackground
val contextThemeWrapper = if (ColorUtils.isColorLight(bg)) {
ContextThemeWrapper(requireContext(), R.style.AppTheme_Light)
} else {
ContextThemeWrapper(requireContext(), R.style.AppTheme_Dark)
}
super.onAttach(contextThemeWrapper)
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@ -61,8 +69,7 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack {
return inflater.inflate(R.layout.dialog_read_book_style, container)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
initView()
initData()
initViewEvent()

@ -25,6 +25,7 @@ abstract class PageDelegate(protected val pageView: PageView) :
)
protected val context: Context = pageView.context
private val defaultAnimationSpeed = 300
private val longPressTimeout = 1000
//起始点
protected var startX: Float = 0f
@ -194,7 +195,20 @@ abstract class PageDelegate(protected val pageView: PageView) :
*/
@CallSuper
open fun onTouch(event: MotionEvent) {
if (isStarted) return
abort()
//获取点击位置
val x = event.x
val y = event.y
setTouchPoint(x, y, false)
when (event.action) {
MotionEvent.ACTION_DOWN -> {
setStartPoint(x, y, false)
}
MotionEvent.ACTION_MOVE -> {
}
}
if (!detector.onTouchEvent(event)) {
//GestureDetector.onFling小幅移动不会触发,所以要自己判断
when (event.action) {

@ -48,16 +48,6 @@ class ThemeConfigFragment : BasePreferenceFragment(),
}
}
}
findPreference<ColorPreference>(PreferKey.cBBackground)?.let {
it.onSaveColor = { color ->
if (!ColorUtils.isColorLight(color)) {
toast(R.string.day_bottom_bar_too_dark)
true
} else {
false
}
}
}
findPreference<ColorPreference>(PreferKey.cNBackground)?.let {
it.onSaveColor = { color ->
if (ColorUtils.isColorLight(color)) {
@ -68,21 +58,11 @@ class ThemeConfigFragment : BasePreferenceFragment(),
}
}
}
findPreference<ColorPreference>(PreferKey.cNBBackground)?.let {
it.onSaveColor = { color ->
if (ColorUtils.isColorLight(color)) {
toast(R.string.night_bottom_bar_too_light)
true
} else {
false
}
}
}
findPreference<ColorPreference>(PreferKey.cAccent)?.let {
it.onSaveColor = { color ->
val background =
getPrefInt(PreferKey.cBackground, getCompatColor(R.color.md_grey_100))
val textColor = getCompatColor(R.color.tv_text_default)
val textColor = getCompatColor(R.color.primaryText)
when {
ColorUtils.getColorDifference(color, background) <= 60 -> {
toast(R.string.accent_background_diff)
@ -100,7 +80,7 @@ class ThemeConfigFragment : BasePreferenceFragment(),
it.onSaveColor = { color ->
val background =
getPrefInt(PreferKey.cNBackground, getCompatColor(R.color.md_grey_900))
val textColor = getCompatColor(R.color.tv_text_default)
val textColor = getCompatColor(R.color.primaryText)
when {
ColorUtils.getColorDifference(color, background) <= 60 -> {
toast(R.string.accent_background_diff)

@ -63,7 +63,7 @@ class RssArticlesAdapter(context: Context, layoutId: Int, val callBack: CallBack
if (item.read) {
tv_title.textColorResource = R.color.tv_text_summary
} else {
tv_title.textColorResource = R.color.tv_text_default
tv_title.textColorResource = R.color.primaryText
}
}
}

@ -9,7 +9,8 @@ import androidx.annotation.MenuRes
import androidx.annotation.StringRes
import androidx.appcompat.widget.PopupMenu
import io.legado.app.R
import io.legado.app.lib.theme.bottomBackground
import io.legado.app.lib.theme.*
import io.legado.app.utils.ColorUtils
import io.legado.app.utils.dp
import io.legado.app.utils.visible
import kotlinx.android.synthetic.main.view_select_action_bar.view.*
@ -23,6 +24,12 @@ class SelectActionBar(context: Context, attrs: AttributeSet?) : FrameLayout(cont
setBackgroundColor(context.bottomBackground)
elevation = 10.dp.toFloat()
View.inflate(context, R.layout.view_select_action_bar, this)
val textIsDark = ColorUtils.isColorLight(context.bottomBackground)
val primaryTextColor = context.getPrimaryTextColor(textIsDark)
val secondaryTextColor = context.getSecondaryTextColor(textIsDark)
cb_selected_all.setTextColor(primaryTextColor)
TintHelper.setTint(cb_selected_all, context.accentColor, !textIsDark)
iv_menu_more.setColorFilter(secondaryTextColor)
cb_selected_all.setOnCheckedChangeListener { buttonView, isChecked ->
if (buttonView.isPressed) {
callBack?.selectAll(isChecked)

@ -117,7 +117,7 @@ class CircleImageView(context: Context, attrs: AttributeSet) :
private var text: String? = null
private var textColor = context.getCompatColor(R.color.tv_text_default)
private var textColor = context.getCompatColor(R.color.primaryText)
init {
super.setScaleType(SCALE_TYPE)
@ -140,7 +140,7 @@ class CircleImageView(context: Context, attrs: AttributeSet) :
if (a.hasValue(R.styleable.CircleImageView_textColor)) {
textColor = a.getColor(
R.styleable.CircleImageView_textColor,
context.getCompatColor(R.color.tv_text_default)
context.getCompatColor(R.color.primaryText)
)
}
a.recycle()

@ -22,4 +22,5 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference
}
super.onBindViewHolder(holder)
}
}

@ -33,8 +33,8 @@ class AccentBgTextView(context: Context, attrs: AttributeSet?) :
background = if (isInEditMode) {
Selector.shapeBuild()
.setCornerRadius(radius)
.setDefaultBgColor(context.getCompatColor(R.color.colorAccent))
.setPressedBgColor(ColorUtils.darkenColor(context.getCompatColor(R.color.colorAccent)))
.setDefaultBgColor(context.getCompatColor(R.color.accent))
.setPressedBgColor(ColorUtils.darkenColor(context.getCompatColor(R.color.accent)))
.create()
} else {
Selector.shapeBuild()

@ -15,7 +15,7 @@ class AccentTextView(context: Context, attrs: AttributeSet?) :
if (!isInEditMode) {
textColor = context.accentColor
} else {
textColorResource = R.color.colorAccent
textColorResource = R.color.accent
}
}

@ -32,14 +32,14 @@ open class StrokeTextView(context: Context, attrs: AttributeSet?) :
.setCornerRadius(radius)
.setStrokeWidth(1.dp)
.setDisabledStrokeColor(context.getCompatColor(R.color.md_grey_500))
.setDefaultStrokeColor(context.getCompatColor(R.color.tv_text_secondary))
.setSelectedStrokeColor(context.getCompatColor(R.color.colorAccent))
.setDefaultStrokeColor(context.getCompatColor(R.color.secondaryText))
.setSelectedStrokeColor(context.getCompatColor(R.color.accent))
.setPressedBgColor(context.getCompatColor(R.color.transparent30))
.create()
this.setTextColor(
Selector.colorBuild()
.setDefaultColor(context.getCompatColor(R.color.tv_text_secondary))
.setSelectedColor(context.getCompatColor(R.color.colorAccent))
.setDefaultColor(context.getCompatColor(R.color.secondaryText))
.setSelectedColor(context.getCompatColor(R.color.accent))
.setDisabledColor(context.getCompatColor(R.color.md_grey_500))
.create()
)

@ -18,7 +18,7 @@ fun Menu.applyTint(context: Context, theme: Theme = Theme.Auto): Menu = this.let
if (menu is MenuBuilder) {
menu.setOptionalIconsVisible(true)
}
val defaultTextColor = context.getCompatColor(R.color.tv_text_default)
val defaultTextColor = context.getCompatColor(R.color.primaryText)
val tintColor = UIUtils.getMenuColor(context, theme)
menu.forEach { item ->
(item as MenuItemImpl).let { impl ->
@ -36,7 +36,7 @@ fun Menu.applyTint(context: Context, theme: Theme = Theme.Auto): Menu = this.let
fun Menu.applyOpenTint(context: Context) {
//展开菜单显示图标
if (this.javaClass.simpleName.equals("MenuBuilder", ignoreCase = true)) {
val defaultTextColor = context.getCompatColor(R.color.tv_text_default)
val defaultTextColor = context.getCompatColor(R.color.primaryText)
try {
var method: Method =
this.javaClass.getDeclaredMethod("setOptionalIconsVisible", java.lang.Boolean.TYPE)

@ -31,7 +31,7 @@ object UIUtils {
theme: Theme = Theme.Auto,
requiresOverflow: Boolean = false
): Int {
val defaultTextColor = context.getCompatColor(R.color.tv_text_default)
val defaultTextColor = context.getCompatColor(R.color.primaryText)
if (requiresOverflow)
return defaultTextColor
val primaryTextColor = context.primaryTextColor

@ -3,5 +3,5 @@
<item android:state_enabled="false" android:color="@color/ate_button_disabled_light" />
<item android:state_pressed="true" android:color="@color/btn_bg_press" />
<item android:state_focused="true" android:color="@color/btn_bg_press_2" />
<item android:color="@color/tv_text_default" />
<item android:color="@color/primaryText" />
</selector>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false" android:drawable="@color/colorAccent" />
<item android:state_pressed="false" android:drawable="@color/accent" />
<item android:state_pressed="true" android:drawable="@color/btn_bg_press" />
</selector>

@ -4,5 +4,5 @@
<solid android:color="#00ffffff" />
<stroke
android:width="1dp"
android:color="@color/tv_text_secondary" />
android:color="@color/secondaryText" />
</shape>

@ -4,5 +4,5 @@
<solid android:color="#00ffffff" />
<stroke
android:width="1dp"
android:color="@color/tv_text_secondary" />
android:color="@color/secondaryText" />
</shape>

@ -92,7 +92,7 @@
android:includeFontPadding="false"
android:singleLine="true"
android:text="@string/book_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="18sp"
tools:ignore="RtlHardcoded" />
@ -361,7 +361,7 @@
android:paddingLeft="8dp"
android:paddingBottom="8dp"
android:text="@string/book_intro"
android:textColor="@color/tv_text_secondary"
android:textColor="@color/secondaryText"
android:textSize="14sp"
android:visibility="visible"
tools:ignore="RtlHardcoded,RtlSymmetry" />
@ -389,7 +389,7 @@
android:gravity="center"
android:includeFontPadding="false"
android:text="@string/remove_from_bookshelf"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="15sp" />
<io.legado.app.ui.widget.text.AccentBgTextView

@ -47,7 +47,7 @@
android:contentDescription="@string/img_cover"
android:scaleType="centerCrop"
app:civ_border_width="2dp"
app:civ_border_color="@color/colorAccent"
app:civ_border_color="@color/accent"
app:layout_constraintBottom_toTopOf="@+id/ll_player_progress"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"

@ -103,7 +103,7 @@
android:includeFontPadding="false"
android:singleLine="true"
android:text="@string/book_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="18sp"
tools:ignore="RtlHardcoded" />
@ -336,7 +336,7 @@
android:clickable="true"
android:focusable="true"
android:text="@string/book_intro"
android:textColor="@color/tv_text_secondary"
android:textColor="@color/secondaryText"
android:textSize="14sp"
android:paddingLeft="8dp"
android:paddingBottom="8dp"
@ -371,7 +371,7 @@
android:gravity="center"
android:includeFontPadding="false"
android:text="@string/remove_from_bookshelf"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="15sp" />
<io.legado.app.ui.widget.text.AccentBgTextView

@ -32,7 +32,7 @@
android:layout_weight="1"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="@color/tv_text_secondary"
android:textColor="@color/secondaryText"
android:textSize="13sp"
android:focusable="true"
tools:text="/" />

@ -14,7 +14,7 @@
app:qrcv_barcodeRectHeight="120dp"
app:qrcv_borderColor="@android:color/white"
app:qrcv_borderSize="1dp"
app:qrcv_cornerColor="@color/colorPrimaryDark"
app:qrcv_cornerColor="@color/primaryDark"
app:qrcv_cornerDisplayType="center"
app:qrcv_cornerLength="20dp"
app:qrcv_cornerSize="3dp"
@ -31,7 +31,7 @@
app:qrcv_maskColor="#33FFFFFF"
app:qrcv_qrCodeTipText="将二维码放入框内,即可自动扫描"
app:qrcv_rectWidth="300dp"
app:qrcv_scanLineColor="@color/colorPrimaryDark"
app:qrcv_scanLineColor="@color/primaryDark"
app:qrcv_scanLineMargin="0dp"
app:qrcv_scanLineSize="0.5dp"
app:qrcv_tipTextColor="@android:color/white"
@ -66,7 +66,7 @@
android:layout_margin="16dp"
android:contentDescription="@string/read_aloud"
android:src="@drawable/ic_daytime"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
app:backgroundTint="@color/background_menu"
app:elevation="2dp"
app:fabSize="mini"

@ -12,7 +12,7 @@
android:id="@+id/vw_title_line"
android:layout_width="6dp"
android:layout_height="0dp"
android:background="@color/colorAccent"
android:background="@color/accent"
app:layout_constraintTop_toTopOf="@+id/tv_title"
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
app:layout_constraintLeft_toLeftOf="@id/iv_book" />

@ -31,7 +31,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:text="@string/auto_page_speed"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp" />
</LinearLayout>
@ -73,7 +73,7 @@
android:layout_weight="1"
android:contentDescription="@string/chapter_list"
android:src="@drawable/ic_toc"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -83,7 +83,7 @@
android:layout_marginTop="3dp"
android:text="@string/chapter_list"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -109,7 +109,7 @@
android:layout_weight="1"
android:contentDescription="@string/main_menu"
android:src="@drawable/ic_menu"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -119,7 +119,7 @@
android:layout_marginTop="3dp"
android:text="@string/main_menu"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -145,7 +145,7 @@
android:layout_weight="1"
android:contentDescription="@string/stop"
android:src="@drawable/ic_auto_page_stop"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -155,7 +155,7 @@
android:layout_marginTop="3dp"
android:text="@string/stop"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -181,7 +181,7 @@
android:layout_weight="1"
android:contentDescription="@string/aloud_config"
android:src="@drawable/ic_settings"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -191,7 +191,7 @@
android:layout_marginTop="3dp"
android:text="@string/setting"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>

@ -20,7 +20,7 @@
android:layout_gravity="center_vertical"
android:layout_marginRight="5dp"
android:text="@string/chapter"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="16sp"
tools:ignore="RtlHardcoded" />
@ -38,7 +38,7 @@
android:paddingTop="4dp"
android:paddingRight="5dp"
android:paddingBottom="4dp"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textCursorDrawable="@drawable/shape_text_cursor"
android:textSize="14sp" />
@ -49,7 +49,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:text="@string/to"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="16sp" />
<EditText
@ -66,7 +66,7 @@
android:paddingTop="4dp"
android:paddingRight="5dp"
android:paddingBottom="4dp"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textCursorDrawable="@drawable/shape_text_cursor"
android:textSize="14sp" />

@ -58,5 +58,5 @@
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="@string/ok"
android:textColor="@color/tv_text_default" />
android:textColor="@color/primaryText" />
</LinearLayout>

@ -31,7 +31,7 @@
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="@string/previous_chapter"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp" />
<View
@ -49,7 +49,7 @@
android:tooltipText="@string/prev_sentence"
android:contentDescription="@string/prev_sentence"
android:src="@drawable/ic_skip_previous"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<ImageView
@ -62,7 +62,7 @@
android:tooltipText="@string/audio_play"
android:contentDescription="@string/audio_play"
android:src="@drawable/ic_play_24dp"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<ImageView
@ -75,7 +75,7 @@
android:contentDescription="@string/stop"
android:tooltipText="@string/stop"
android:src="@drawable/ic_stop_black_24dp"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<ImageView
@ -88,7 +88,7 @@
android:contentDescription="@string/next_sentence"
android:tooltipText="@string/next_sentence"
android:src="@drawable/ic_skip_next"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<View
@ -108,7 +108,7 @@
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="@string/next_chapter"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp" />
</LinearLayout>
@ -126,7 +126,7 @@
android:tooltipText="@string/set_timer"
android:contentDescription="@string/set_timer"
android:src="@drawable/ic_time_add_24dp"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<io.legado.app.lib.theme.view.ATESeekBar
@ -163,7 +163,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:text="@string/read_aloud_speed"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp" />
<io.legado.app.lib.theme.view.ATESwitch
@ -212,7 +212,7 @@
android:layout_weight="1"
android:contentDescription="@string/chapter_list"
android:src="@drawable/ic_toc"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -222,7 +222,7 @@
android:layout_marginTop="3dp"
android:text="@string/chapter_list"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -248,7 +248,7 @@
android:layout_weight="1"
android:contentDescription="@string/main_menu"
android:src="@drawable/ic_menu"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -258,7 +258,7 @@
android:layout_marginTop="3dp"
android:text="@string/main_menu"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -284,7 +284,7 @@
android:layout_weight="1"
android:contentDescription="@string/to_backstage"
android:src="@drawable/ic_visibility_off"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -294,7 +294,7 @@
android:layout_marginTop="3dp"
android:text="@string/to_backstage"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -320,7 +320,7 @@
android:layout_weight="1"
android:contentDescription="@string/aloud_config"
android:src="@drawable/ic_settings"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
@ -330,7 +330,7 @@
android:layout_marginTop="3dp"
android:text="@string/setting"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>

@ -323,7 +323,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/image_cover_default"
app:civ_border_color="@color/tv_text_default"
app:civ_border_color="@color/primaryText"
app:civ_border_width="1dp"
app:text="@string/text" />
@ -337,7 +337,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/image_cover_default"
app:civ_border_color="@color/tv_text_default"
app:civ_border_color="@color/primaryText"
app:civ_border_width="1dp"
app:text="@string/text" />
@ -351,7 +351,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/image_cover_default"
app:civ_border_color="@color/tv_text_default"
app:civ_border_color="@color/primaryText"
app:civ_border_width="1dp"
app:text="@string/text" />
@ -365,7 +365,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/image_cover_default"
app:civ_border_color="@color/tv_text_default"
app:civ_border_color="@color/primaryText"
app:civ_border_width="1dp"
app:text="@string/text" />
@ -379,7 +379,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/image_cover_default"
app:civ_border_color="@color/tv_text_default"
app:civ_border_color="@color/primaryText"
app:civ_border_width="1dp"
app:text="@string/text" />

@ -37,7 +37,7 @@
android:paddingRight="10dp"
android:singleLine="true"
android:gravity="center_vertical"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatImageView
@ -48,7 +48,7 @@
android:contentDescription="@string/go_to_top"
android:src="@drawable/ic_arrow_drop_up"
android:tooltipText="@string/go_to_top"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<androidx.appcompat.widget.AppCompatImageView
@ -59,7 +59,7 @@
android:contentDescription="@string/go_to_bottom"
android:src="@drawable/ic_arrow_drop_down"
android:tooltipText="@string/go_to_bottom"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
</LinearLayout>

@ -24,7 +24,7 @@
android:padding="3dp"
android:textSize="15sp"
android:text="@string/book_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:singleLine="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tv_group_s"

@ -13,7 +13,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:singleLine="true"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/swt_enabled"
app:layout_constraintTop_toTopOf="parent"
@ -40,7 +40,7 @@
android:contentDescription="@string/edit"
android:padding="6dp"
android:src="@drawable/ic_edit"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
app:layout_constraintRight_toLeftOf="@id/iv_menu_more"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
@ -52,7 +52,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="6dp"
android:src="@drawable/ic_more_vert"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"

@ -68,7 +68,7 @@
android:lines="2"
android:ellipsize="end"
android:text="@string/book_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp"
app:layout_constraintLeft_toLeftOf="@+id/bg_cover"
app:layout_constraintRight_toRightOf="@+id/bg_cover"

@ -63,7 +63,7 @@
android:paddingLeft="2dp"
android:singleLine="true"
android:text="@string/book_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/tv_author"
app:layout_constraintLeft_toRightOf="@+id/iv_cover"

@ -11,6 +11,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/primaryText"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_checked" />
@ -20,6 +21,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/secondaryText"
app:layout_constraintTop_toBottomOf="@+id/tv_origin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
@ -32,7 +34,7 @@
android:layout_margin="8dp"
android:src="@drawable/ic_check"
android:visibility="invisible"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />

@ -25,7 +25,7 @@
android:gravity="center"
android:singleLine="true"
android:text="@string/book_source"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="16sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />

@ -38,7 +38,7 @@
android:layout_height="36dp"
android:padding="6dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
android:src="@drawable/ic_play_24dp"
android:contentDescription="@string/start"
app:layout_constraintTop_toTopOf="parent"

@ -13,6 +13,6 @@
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:maxLines="1"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp"
tools:ignore="UnusedAttribute" />

@ -23,7 +23,8 @@
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:textColor="@color/primaryText" />
<io.legado.app.ui.widget.anima.RotateLoading
android:id="@+id/rotate_loading"
@ -41,7 +42,7 @@
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_arrow_right"
app:tint="@color/tv_text_secondary"
app:tint="@color/secondaryText"
tools:ignore="ContentDescription" />
</LinearLayout>

@ -14,7 +14,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:textColor="@color/tv_text_default" />
android:textColor="@color/primaryText" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_checked"
@ -22,6 +22,6 @@
android:layout_height="24dp"
android:src="@drawable/ic_check"
android:visibility="invisible"
app:tint="@color/tv_text_default" />
app:tint="@color/primaryText" />
</LinearLayout>

@ -14,7 +14,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:singleLine="true"
android:textColor="@color/tv_text_default" />
android:textColor="@color/primaryText" />
<TextView
android:id="@+id/tv_edit"

@ -28,7 +28,7 @@
android:scaleType="center"
android:visibility="invisible"
android:src="@drawable/ic_folder"
app:tint="@color/tv_text_default" />
app:tint="@color/primaryText" />
</FrameLayout>
<LinearLayout

@ -32,7 +32,7 @@
android:contentDescription="@string/edit"
android:padding="6dp"
android:src="@drawable/ic_edit"
android:tint="@color/tv_text_default" />
android:tint="@color/primaryText" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_menu_more"
@ -41,6 +41,6 @@
android:padding="6dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_more_vert"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
tools:ignore="RtlHardcoded" />
</LinearLayout>

@ -13,7 +13,7 @@
android:maxLines="2"
android:ellipsize="end"
android:text="@string/app_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/tv_pub_date"

@ -27,7 +27,7 @@
android:maxLines="2"
android:ellipsize="end"
android:text="@string/app_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="15sp"
android:textStyle="bold"
android:paddingLeft="12dp"

@ -29,7 +29,7 @@
android:maxLines="2"
android:ellipsize="end"
android:text="@string/app_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="13sp"
android:paddingTop="10dp"
app:layout_constraintTop_toBottomOf="@+id/image_view"

@ -15,7 +15,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:singleLine="true"
android:textColor="@color/tv_text_default" />
android:textColor="@color/primaryText" />
<io.legado.app.lib.theme.view.ATESwitch
android:id="@+id/swt_enabled"
@ -35,7 +35,7 @@
android:contentDescription="@string/edit"
android:padding="6dp"
android:src="@drawable/ic_edit"
android:tint="@color/tv_text_default" />
android:tint="@color/primaryText" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_menu_more"
@ -44,7 +44,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="6dp"
android:src="@drawable/ic_more_vert"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
tools:ignore="RtlHardcoded" />
</LinearLayout>

@ -34,7 +34,7 @@
android:layout_margin="8dp"
android:singleLine="true"
android:text="@string/app_name"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="16sp"
app:layout_constraintEnd_toStartOf="@id/bv_originCount"
app:layout_constraintStart_toEndOf="@+id/iv_cover"
@ -57,7 +57,7 @@
android:ellipsize="end"
android:lines="1"
android:text="@string/author"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
<io.legado.app.ui.widget.LabelsBar
@ -73,7 +73,7 @@
android:ellipsize="end"
android:lines="1"
android:text="@string/last_read"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
<io.legado.app.ui.widget.text.MultilineTextView
@ -82,7 +82,7 @@
android:layout_height="match_parent"
android:ellipsize="end"
android:text="@string/book_intro"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>

@ -10,6 +10,6 @@
android:padding="5dp"
android:maxLines="1"
android:scrollbars="none"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp"
tools:ignore="UnusedAttribute" />

@ -29,7 +29,7 @@
android:padding="6dp"
android:tooltipText="@string/edit"
android:src="@drawable/ic_edit"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
<androidx.appcompat.widget.AppCompatImageView
@ -41,7 +41,7 @@
android:tooltipText="@string/more_menu"
android:padding="6dp"
android:src="@drawable/ic_clear_all"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
tools:ignore="UnusedAttribute" />
</LinearLayout>

@ -27,7 +27,7 @@
android:layout_height="24dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_more_vert"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
android:visibility="gone"
android:contentDescription="@string/more_menu" />

@ -21,7 +21,7 @@
android:contentDescription="@string/reduce"
android:src="@drawable/ic_remove"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:tint="@color/tv_text_default" />
android:tint="@color/primaryText" />
<io.legado.app.lib.theme.view.ATESeekBar
android:id="@+id/seek_bar"
@ -38,7 +38,7 @@
android:contentDescription="@string/plus"
android:src="@drawable/ic_add"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:tint="@color/tv_text_default" />
android:tint="@color/primaryText" />
<TextView
android:id="@+id/tv_seek_value"

@ -20,7 +20,7 @@
android:id="@+id/btn_error_retry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorAccent"
android:backgroundTint="@color/accent"
android:minWidth="96dp"
android:text="@string/dynamic_click_retry" />

@ -35,7 +35,7 @@
android:singleLine="true"
android:textSize="16sp"
android:text="@string/title"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

@ -19,7 +19,7 @@
android:paddingLeft="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorAccent"
android:textColor="@color/accent"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<View

@ -99,7 +99,7 @@
android:layout_margin="16dp"
android:contentDescription="@string/auto_next_page"
android:src="@drawable/ic_auto_page"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
android:tooltipText="@string/auto_next_page"
app:backgroundTint="@color/background_menu"
app:elevation="2dp"
@ -119,7 +119,7 @@
android:layout_margin="16dp"
android:contentDescription="@string/replace_rule_title"
android:src="@drawable/ic_find_replace"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
android:tooltipText="@string/replace_rule_title"
app:backgroundTint="@color/background_menu"
app:elevation="2dp"
@ -139,7 +139,7 @@
android:layout_margin="16dp"
android:contentDescription="@string/dark_theme"
android:src="@drawable/ic_brightness"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
android:tooltipText="@string/dark_theme"
app:backgroundTint="@color/background_menu"
app:elevation="2dp"
@ -188,7 +188,7 @@
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="@string/previous_chapter"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp" />
<io.legado.app.lib.theme.view.ATESeekBar
@ -211,7 +211,7 @@
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="@string/next_chapter"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="14sp" />
</LinearLayout>
@ -239,22 +239,24 @@
android:paddingBottom="7dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_catalog"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:contentDescription="@string/chapter_list"
android:src="@drawable/ic_toc"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/tv_catalog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:maxLines="1"
android:text="@string/chapter_list"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -275,22 +277,24 @@
android:paddingBottom="7dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_read_aloud"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:contentDescription="@string/read_aloud"
android:src="@drawable/ic_read_aloud"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/tv_read_aloud"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:maxLines="1"
android:text="@string/read_aloud"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -311,22 +315,24 @@
android:paddingBottom="7dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_font"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:contentDescription="@string/interface_setting"
android:src="@drawable/ic_interface_setting"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/tv_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:maxLines="1"
android:text="@string/interface_setting"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>
@ -347,22 +353,24 @@
android:paddingBottom="7dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_setting"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:contentDescription="@string/setting"
android:src="@drawable/ic_settings"
app:tint="@color/tv_text_default"
app:tint="@color/primaryText"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/tv_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:maxLines="1"
android:text="@string/setting"
android:textColor="@color/tv_text_default"
android:textColor="@color/primaryText"
android:textSize="12sp" />
</LinearLayout>

@ -17,8 +17,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:text="@string/select_all_count"
android:textColor="@color/tv_text_default" />
android:text="@string/select_all_count" />
<io.legado.app.ui.widget.text.AccentStrokeTextView
android:id="@+id/btn_revert_selection"
@ -50,7 +49,7 @@
android:tooltipText="@string/more_menu"
android:padding="6dp"
android:src="@drawable/ic_more_vert"
android:tint="@color/tv_text_default"
android:tint="@color/primaryText"
android:visibility="gone"
tools:ignore="RtlHardcoded,UnusedAttribute" />

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">@color/md_blue_grey_600</color>
<color name="colorPrimaryDark">@color/md_blue_grey_700</color>
<color name="colorAccent">@color/md_deep_orange_800</color>
<color name="primary">@color/md_blue_grey_600</color>
<color name="primaryDark">@color/md_blue_grey_700</color>
<color name="accent">@color/md_deep_orange_800</color>
<color name="background">@color/md_grey_900</color>
<color name="background_card">@color/md_grey_850</color>
@ -26,8 +26,8 @@
<color name="tv_btn_normal_black">#737373</color>
<color name="tv_btn_press_black">#565656</color>
<color name="tv_text_default">#EEEEEE</color>
<color name="tv_text_secondary">#D5D5D5</color>
<color name="primaryText">#ffffffff</color>
<color name="secondaryText">#b3ffffff</color>
<color name="tv_text_summary">#B3B3B3</color>
<color name="menu_color_default">#b7b7b7</color>

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">@color/md_light_blue_600</color>
<color name="colorPrimaryDark">@color/md_light_blue_700</color>
<color name="colorAccent">@color/md_pink_800</color>
<color name="primary">@color/md_light_blue_600</color>
<color name="primaryDark">@color/md_light_blue_700</color>
<color name="accent">@color/md_pink_800</color>
<color name="divider">#66666666</color>
<color name="lightBlue_color">#FF578FCC</color>
@ -31,8 +31,8 @@
<color name="tv_btn_normal_black">#737373</color>
<color name="tv_btn_press_black">#adadad</color>
<color name="tv_text_default">#0E0E0E</color>
<color name="tv_text_secondary">#2C2C2C</color>
<color name="primaryText">#de000000</color>
<color name="secondaryText">#8a000000</color>
<color name="tv_text_summary">#8A2C2C2C</color>
<color name="tv_text_book_detail">#dfdfdf</color>
<color name="menu_color_default">#383838</color>

@ -25,9 +25,9 @@
<!-- Base application theme. -->
<style name="Base.AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="colorAccent">@color/accent</item>
<item name="actionOverflowMenuStyle">@style/Style.PopupMenu</item>
<item name="android:itemTextAppearance">@style/Style.MenuItemText</item>
<item name="android:popupMenuStyle">@style/Style.PopupMenu</item>

Loading…
Cancel
Save