diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index 5b8786889..3275be677 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -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)) diff --git a/app/src/main/java/io/legado/app/lib/theme/ATH.kt b/app/src/main/java/io/legado/app/lib/theme/ATH.kt index 13d5ed0d9..d9ee9e2a2 100644 --- a/app/src/main/java/io/legado/app/lib/theme/ATH.kt +++ b/app/src/main/java/io/legado/app/lib/theme/ATH.kt @@ -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 diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt index 12e93ec4f..1a739edb8 100644 --- a/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt +++ b/app/src/main/java/io/legado/app/lib/theme/view/ATERadioNoButton.kt @@ -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() } } diff --git a/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListAdapter.kt index b9d20920b..6ea580b31 100644 --- a/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListAdapter.kt @@ -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()) { diff --git a/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListFragment.kt b/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListFragment.kt index f22b54516..677d623e2 100644 --- a/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListFragment.kt +++ b/app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListFragment.kt @@ -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(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(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) { diff --git a/app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt index 4af4e96fa..cacd737cd 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/ChapterListAdapter.kt @@ -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 } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt index 0af320475..8dd04832e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt @@ -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 { diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt index 56198cac3..99c951643 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt @@ -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()) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index f446681a8..2c2df5bbf 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -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) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index 50b045c1c..c9bccd841 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -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() diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt index 19ec4b76d..59dc1d159 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt @@ -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) { diff --git a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt index 6a1673403..6a56b345f 100644 --- a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt @@ -48,16 +48,6 @@ class ThemeConfigFragment : BasePreferenceFragment(), } } } - findPreference(PreferKey.cBBackground)?.let { - it.onSaveColor = { color -> - if (!ColorUtils.isColorLight(color)) { - toast(R.string.day_bottom_bar_too_dark) - true - } else { - false - } - } - } findPreference(PreferKey.cNBackground)?.let { it.onSaveColor = { color -> if (ColorUtils.isColorLight(color)) { @@ -68,21 +58,11 @@ class ThemeConfigFragment : BasePreferenceFragment(), } } } - findPreference(PreferKey.cNBBackground)?.let { - it.onSaveColor = { color -> - if (ColorUtils.isColorLight(color)) { - toast(R.string.night_bottom_bar_too_light) - true - } else { - false - } - } - } findPreference(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) diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt index 19fd6d0fb..13f3e59cb 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt @@ -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 } } } diff --git a/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt b/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt index dc37085b0..4bef4c53d 100644 --- a/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt @@ -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) diff --git a/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt b/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt index 7f14686e8..8ed965c8c 100644 --- a/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt @@ -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() diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt b/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt index 0763c8474..ff3db4a9f 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt +++ b/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt @@ -22,4 +22,5 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference } super.onBindViewHolder(holder) } + } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt index 8da4fa137..f6fc05cd4 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt @@ -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() diff --git a/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt index f797a9f57..be3074766 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt @@ -15,7 +15,7 @@ class AccentTextView(context: Context, attrs: AttributeSet?) : if (!isInEditMode) { textColor = context.accentColor } else { - textColorResource = R.color.colorAccent + textColorResource = R.color.accent } } diff --git a/app/src/main/java/io/legado/app/ui/widget/text/StrokeTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/StrokeTextView.kt index 3fa0544d3..af32acda2 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/StrokeTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/StrokeTextView.kt @@ -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() ) diff --git a/app/src/main/java/io/legado/app/utils/MenuExtensions.kt b/app/src/main/java/io/legado/app/utils/MenuExtensions.kt index 807ff7c34..ace9e9531 100644 --- a/app/src/main/java/io/legado/app/utils/MenuExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/MenuExtensions.kt @@ -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) diff --git a/app/src/main/java/io/legado/app/utils/UIUtils.kt b/app/src/main/java/io/legado/app/utils/UIUtils.kt index 31b02199b..b50a4c493 100644 --- a/app/src/main/java/io/legado/app/utils/UIUtils.kt +++ b/app/src/main/java/io/legado/app/utils/UIUtils.kt @@ -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 diff --git a/app/src/main/res/color/selector_image.xml b/app/src/main/res/color/selector_image.xml index edbef31f6..081b03cf0 100644 --- a/app/src/main/res/color/selector_image.xml +++ b/app/src/main/res/color/selector_image.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/selector_btn_accent_bg.xml b/app/src/main/res/drawable/selector_btn_accent_bg.xml index a888e77e0..d06cfe139 100644 --- a/app/src/main/res/drawable/selector_btn_accent_bg.xml +++ b/app/src/main/res/drawable/selector_btn_accent_bg.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_radius_10dp.xml b/app/src/main/res/drawable/shape_radius_10dp.xml index 9e72a3a38..3680c9e7e 100644 --- a/app/src/main/res/drawable/shape_radius_10dp.xml +++ b/app/src/main/res/drawable/shape_radius_10dp.xml @@ -4,5 +4,5 @@ + android:color="@color/secondaryText" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/shape_radius_1dp.xml b/app/src/main/res/drawable/shape_radius_1dp.xml index f032285f7..d8e0c3f87 100644 --- a/app/src/main/res/drawable/shape_radius_1dp.xml +++ b/app/src/main/res/drawable/shape_radius_1dp.xml @@ -4,5 +4,5 @@ + android:color="@color/secondaryText" /> \ No newline at end of file diff --git a/app/src/main/res/layout-land/activity_book_info.xml b/app/src/main/res/layout-land/activity_book_info.xml index dbc83517e..b42bf1bfc 100644 --- a/app/src/main/res/layout-land/activity_book_info.xml +++ b/app/src/main/res/layout-land/activity_book_info.xml @@ -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" /> @@ -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" /> diff --git a/app/src/main/res/layout/activity_qrcode_capture.xml b/app/src/main/res/layout/activity_qrcode_capture.xml index 62337c255..301d1e845 100644 --- a/app/src/main/res/layout/activity_qrcode_capture.xml +++ b/app/src/main/res/layout/activity_qrcode_capture.xml @@ -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" diff --git a/app/src/main/res/layout/activity_welcome.xml b/app/src/main/res/layout/activity_welcome.xml index 409d38838..26334eab6 100644 --- a/app/src/main/res/layout/activity_welcome.xml +++ b/app/src/main/res/layout/activity_welcome.xml @@ -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" /> diff --git a/app/src/main/res/layout/dialog_auto_read.xml b/app/src/main/res/layout/dialog_auto_read.xml index c444d66bb..21c5c2c4f 100644 --- a/app/src/main/res/layout/dialog_auto_read.xml +++ b/app/src/main/res/layout/dialog_auto_read.xml @@ -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" /> @@ -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" /> @@ -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" /> @@ -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" /> @@ -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" /> diff --git a/app/src/main/res/layout/dialog_download_choice.xml b/app/src/main/res/layout/dialog_download_choice.xml index 9eabee75b..4548ac329 100644 --- a/app/src/main/res/layout/dialog_download_choice.xml +++ b/app/src/main/res/layout/dialog_download_choice.xml @@ -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" /> diff --git a/app/src/main/res/layout/dialog_page_key.xml b/app/src/main/res/layout/dialog_page_key.xml index 2f20b8c53..f2e1c8a3a 100644 --- a/app/src/main/res/layout/dialog_page_key.xml +++ b/app/src/main/res/layout/dialog_page_key.xml @@ -58,5 +58,5 @@ android:paddingTop="5dp" android:paddingBottom="5dp" android:text="@string/ok" - android:textColor="@color/tv_text_default" /> + android:textColor="@color/primaryText" /> \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_read_aloud.xml b/app/src/main/res/layout/dialog_read_aloud.xml index aa72dbc99..b605ac09e 100644 --- a/app/src/main/res/layout/dialog_read_aloud.xml +++ b/app/src/main/res/layout/dialog_read_aloud.xml @@ -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" /> @@ -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" /> @@ -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" /> @@ -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" /> @@ -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" /> diff --git a/app/src/main/res/layout/dialog_read_book_style.xml b/app/src/main/res/layout/dialog_read_book_style.xml index b57705513..86ab37604 100644 --- a/app/src/main/res/layout/dialog_read_book_style.xml +++ b/app/src/main/res/layout/dialog_read_book_style.xml @@ -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" /> diff --git a/app/src/main/res/layout/fragment_chapter_list.xml b/app/src/main/res/layout/fragment_chapter_list.xml index 8964c91c6..3d8943d79 100644 --- a/app/src/main/res/layout/fragment_chapter_list.xml +++ b/app/src/main/res/layout/fragment_chapter_list.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_arrange_book.xml b/app/src/main/res/layout/item_arrange_book.xml index 4fdd7a19c..7323a53c7 100644 --- a/app/src/main/res/layout/item_arrange_book.xml +++ b/app/src/main/res/layout/item_arrange_book.xml @@ -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" diff --git a/app/src/main/res/layout/item_book_source.xml b/app/src/main/res/layout/item_book_source.xml index 3ae65e3b9..a9089f1af 100644 --- a/app/src/main/res/layout/item_book_source.xml +++ b/app/src/main/res/layout/item_book_source.xml @@ -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" diff --git a/app/src/main/res/layout/item_bookshelf_grid.xml b/app/src/main/res/layout/item_bookshelf_grid.xml index fbe782212..114c3c58e 100644 --- a/app/src/main/res/layout/item_bookshelf_grid.xml +++ b/app/src/main/res/layout/item_bookshelf_grid.xml @@ -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" diff --git a/app/src/main/res/layout/item_bookshelf_list.xml b/app/src/main/res/layout/item_bookshelf_list.xml index 3d6f71213..f6e0a694d 100644 --- a/app/src/main/res/layout/item_bookshelf_list.xml +++ b/app/src/main/res/layout/item_bookshelf_list.xml @@ -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" diff --git a/app/src/main/res/layout/item_change_source.xml b/app/src/main/res/layout/item_change_source.xml index 81625c642..db773e7fc 100644 --- a/app/src/main/res/layout/item_change_source.xml +++ b/app/src/main/res/layout/item_change_source.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_cover.xml b/app/src/main/res/layout/item_cover.xml index 9956e4bd1..1b88c854a 100644 --- a/app/src/main/res/layout/item_cover.xml +++ b/app/src/main/res/layout/item_cover.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_download.xml b/app/src/main/res/layout/item_download.xml index 8413da785..6d06afb86 100644 --- a/app/src/main/res/layout/item_download.xml +++ b/app/src/main/res/layout/item_download.xml @@ -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" diff --git a/app/src/main/res/layout/item_fillet_text.xml b/app/src/main/res/layout/item_fillet_text.xml index dcdf75935..3fb4ebbd7 100644 --- a/app/src/main/res/layout/item_fillet_text.xml +++ b/app/src/main/res/layout/item_fillet_text.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_find_book.xml b/app/src/main/res/layout/item_find_book.xml index d689630d2..5ee810333 100644 --- a/app/src/main/res/layout/item_find_book.xml +++ b/app/src/main/res/layout/item_find_book.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_font.xml b/app/src/main/res/layout/item_font.xml index 24c9be27e..0e08f17bc 100644 --- a/app/src/main/res/layout/item_font.xml +++ b/app/src/main/res/layout/item_font.xml @@ -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" /> + app:tint="@color/primaryText" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_group_select.xml b/app/src/main/res/layout/item_group_select.xml index 4c04efbf0..c6c08fbec 100644 --- a/app/src/main/res/layout/item_group_select.xml +++ b/app/src/main/res/layout/item_group_select.xml @@ -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" /> + app:tint="@color/primaryText" /> + android:tint="@color/primaryText" /> diff --git a/app/src/main/res/layout/item_rss_article.xml b/app/src/main/res/layout/item_rss_article.xml index 311944d98..508350eb3 100644 --- a/app/src/main/res/layout/item_rss_article.xml +++ b/app/src/main/res/layout/item_rss_article.xml @@ -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" diff --git a/app/src/main/res/layout/item_rss_article_1.xml b/app/src/main/res/layout/item_rss_article_1.xml index 9c46e1aaf..32fc80cea 100644 --- a/app/src/main/res/layout/item_rss_article_1.xml +++ b/app/src/main/res/layout/item_rss_article_1.xml @@ -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" diff --git a/app/src/main/res/layout/item_rss_article_2.xml b/app/src/main/res/layout/item_rss_article_2.xml index 55eaa7aac..83a935c26 100644 --- a/app/src/main/res/layout/item_rss_article_2.xml +++ b/app/src/main/res/layout/item_rss_article_2.xml @@ -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" diff --git a/app/src/main/res/layout/item_rss_source.xml b/app/src/main/res/layout/item_rss_source.xml index d0ecd8788..6ec24421d 100644 --- a/app/src/main/res/layout/item_rss_source.xml +++ b/app/src/main/res/layout/item_rss_source.xml @@ -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" /> + android:tint="@color/primaryText" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_search.xml b/app/src/main/res/layout/item_search.xml index 421082d13..eb0289863 100644 --- a/app/src/main/res/layout/item_search.xml +++ b/app/src/main/res/layout/item_search.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_text.xml b/app/src/main/res/layout/item_text.xml index 357efdde3..b8d2bcc52 100644 --- a/app/src/main/res/layout/item_text.xml +++ b/app/src/main/res/layout/item_text.xml @@ -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" /> diff --git a/app/src/main/res/layout/item_toc_regex.xml b/app/src/main/res/layout/item_toc_regex.xml index db9e55269..650d59d4d 100644 --- a/app/src/main/res/layout/item_toc_regex.xml +++ b/app/src/main/res/layout/item_toc_regex.xml @@ -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" /> \ No newline at end of file diff --git a/app/src/main/res/layout/popup_action_menu.xml b/app/src/main/res/layout/popup_action_menu.xml index 0f6b6e0e5..ab9a681b8 100644 --- a/app/src/main/res/layout/popup_action_menu.xml +++ b/app/src/main/res/layout/popup_action_menu.xml @@ -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" /> diff --git a/app/src/main/res/layout/view_detail_seek_bar.xml b/app/src/main/res/layout/view_detail_seek_bar.xml index af87a83bb..a63c1b8dd 100644 --- a/app/src/main/res/layout/view_detail_seek_bar.xml +++ b/app/src/main/res/layout/view_detail_seek_bar.xml @@ -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" /> + android:tint="@color/primaryText" /> diff --git a/app/src/main/res/layout/view_preference.xml b/app/src/main/res/layout/view_preference.xml index f825afe26..0fb402876 100644 --- a/app/src/main/res/layout/view_preference.xml +++ b/app/src/main/res/layout/view_preference.xml @@ -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" /> diff --git a/app/src/main/res/layout/view_preference_category.xml b/app/src/main/res/layout/view_preference_category.xml index 6bdc58c5a..afc45f119 100644 --- a/app/src/main/res/layout/view_preference_category.xml +++ b/app/src/main/res/layout/view_preference_category.xml @@ -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" /> @@ -239,22 +239,24 @@ android:paddingBottom="7dp"> @@ -275,22 +277,24 @@ android:paddingBottom="7dp"> @@ -311,22 +315,24 @@ android:paddingBottom="7dp"> @@ -347,22 +353,24 @@ android:paddingBottom="7dp"> diff --git a/app/src/main/res/layout/view_select_action_bar.xml b/app/src/main/res/layout/view_select_action_bar.xml index 2e8d733ab..5370a932d 100644 --- a/app/src/main/res/layout/view_select_action_bar.xml +++ b/app/src/main/res/layout/view_select_action_bar.xml @@ -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" /> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index bdd2218b6..879ce0647 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -1,8 +1,8 @@ - @color/md_blue_grey_600 - @color/md_blue_grey_700 - @color/md_deep_orange_800 + @color/md_blue_grey_600 + @color/md_blue_grey_700 + @color/md_deep_orange_800 @color/md_grey_900 @color/md_grey_850 @@ -26,8 +26,8 @@ #737373 #565656 - #EEEEEE - #D5D5D5 + #ffffffff + #b3ffffff #B3B3B3 #b7b7b7 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 2dc83a726..30e85cda3 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,8 +1,8 @@ - @color/md_light_blue_600 - @color/md_light_blue_700 - @color/md_pink_800 + @color/md_light_blue_600 + @color/md_light_blue_700 + @color/md_pink_800 #66666666 #FF578FCC @@ -31,8 +31,8 @@ #737373 #adadad - #0E0E0E - #2C2C2C + #de000000 + #8a000000 #8A2C2C2C #dfdfdf #383838 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a8400c4fc..b01529784 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -25,9 +25,9 @@