diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 370e36e32..93c221cdd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -32,7 +32,7 @@ android:largeHeap="true" android:requestLegacyExternalStorage="true" android:roundIcon="@mipmap/ic_launcher_round" - android:theme="@style/Theme.Base" + android:theme="@style/Theme.Base.Light" android:networkSecurityConfig="@xml/network_security_config"> + android:theme="@style/Theme.Base.Light" /> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt index cc8740b4a..1eb724527 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt @@ -101,12 +101,13 @@ abstract class SettingsController : PreferenceController() { private fun animatePreferenceHighlight(view: View) { val origBackground = view.background ValueAnimator - .ofObject(ArgbEvaluator(), Color.TRANSPARENT, view.context.getResourceColor(R.attr.rippleColor)) + .ofObject(ArgbEvaluator(), Color.TRANSPARENT, view.context.getResourceColor(R.attr.colorControlHighlight)) .apply { - duration = 500L - repeatCount = 2 + duration = 200L + repeatCount = 5 + repeatMode = ValueAnimator.REVERSE addUpdateListener { animator -> view.setBackgroundColor(animator.animatedValue as Int) } - reverse() + start() } .doOnEnd { // Restore original ripple diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index b1a7e79bf..83f46f8d6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -157,7 +157,7 @@ class WebViewActivity : BaseViewBindingActivity() { backItem?.isEnabled = binding.webview.canGoBack() forwardItem?.isEnabled = binding.webview.canGoForward() - val iconTintColor = getResourceColor(R.attr.colorOnPrimary) + val iconTintColor = getResourceColor(R.attr.colorOnToolbar) val translucentIconTintColor = ColorUtils.setAlphaComponent(iconTintColor, 127) backItem?.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt index 5e87c2c61..0ff872bf1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt @@ -93,7 +93,7 @@ fun Context.copyToClipboard(label: String, content: String) { */ fun Context.notificationBuilder(channelId: String, block: (NotificationCompat.Builder.() -> Unit)? = null): NotificationCompat.Builder { val builder = NotificationCompat.Builder(this, channelId) - .setColor(ContextCompat.getColor(this, R.color.colorPrimary)) + .setColor(ContextCompat.getColor(this, R.color.accent_lightblue)) if (block != null) { builder.block() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt index 78c39c4a6..fb0ff44fd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.widget import android.content.Context import android.content.res.ColorStateList -import android.graphics.Color import android.util.AttributeSet import android.view.LayoutInflater import android.widget.LinearLayout @@ -12,6 +11,7 @@ import androidx.annotation.StringRes import androidx.appcompat.view.ContextThemeWrapper import androidx.core.view.isVisible import com.google.android.material.button.MaterialButton +import com.mikepenz.aboutlibraries.util.getThemeColor import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.databinding.CommonViewEmptyBinding import kotlin.random.Random @@ -42,17 +42,22 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? binding.textLabel.text = message binding.actionsContainer.removeAllViews() + val buttonContext = ContextThemeWrapper(context, R.style.Widget_Tachiyomi_Button_ActionButton) + val buttonColor = ColorStateList.valueOf(context.getThemeColor(R.attr.colorOnBackground)) actions?.forEach { - val button = MaterialButton(ContextThemeWrapper(context, R.style.Theme_Widget_Button_Action)).apply { + val button = MaterialButton( + buttonContext, + null, + R.attr.borderlessButtonStyle + ).apply { layoutParams = LinearLayout.LayoutParams( 0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f / actions.size ) - backgroundTintList = ColorStateList.valueOf(Color.TRANSPARENT) - stateListAnimator = null - elevation = 0f + setTextColor(buttonColor) + iconTint = buttonColor setIconResource(it.iconResId) setText(it.stringResId) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt index b3fb931ba..81e1fcef8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt @@ -2,22 +2,18 @@ package eu.kanade.tachiyomi.widget import android.content.Context import android.util.AttributeSet -import androidx.core.content.ContextCompat import androidx.swiperefreshlayout.widget.SwipeRefreshLayout +import com.mikepenz.aboutlibraries.util.getThemeColor import eu.kanade.tachiyomi.R -class ThemedSwipeRefreshLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : - SwipeRefreshLayout(context, attrs) { - +class ThemedSwipeRefreshLayout @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : SwipeRefreshLayout(context, attrs) { init { - setColors() - } - - private fun setColors() { - // Background is controlled with "swipeRefreshLayoutProgressSpinnerBackgroundColor" in XML - + // Background + setProgressBackgroundColorSchemeColor(context.getThemeColor(R.attr.colorPrimary)) // This updates the progress arrow color - val white = ContextCompat.getColor(context, R.color.md_white_1000) - setColorSchemeColors(white, white, white) + setColorSchemeColors(context.getThemeColor(R.attr.colorOnPrimary)) } } diff --git a/app/src/main/res/color/background_color_chip_state.xml b/app/src/main/res/color/background_color_chip_state.xml deleted file mode 100644 index 04f3cfb2d..000000000 --- a/app/src/main/res/color/background_color_chip_state.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/color/button_action_selector.xml b/app/src/main/res/color/button_action_selector.xml index d844195f1..f8e88896b 100644 --- a/app/src/main/res/color/button_action_selector.xml +++ b/app/src/main/res/color/button_action_selector.xml @@ -1,5 +1,5 @@ - - + + diff --git a/app/src/main/res/color/draggable_card_foreground.xml b/app/src/main/res/color/draggable_card_foreground.xml new file mode 100644 index 000000000..32750a3a4 --- /dev/null +++ b/app/src/main/res/color/draggable_card_foreground.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/color/library_item_background.xml b/app/src/main/res/color/library_item_background.xml new file mode 100644 index 000000000..c967f28e9 --- /dev/null +++ b/app/src/main/res/color/library_item_background.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/color/library_item_foreground.xml b/app/src/main/res/color/library_item_foreground.xml new file mode 100644 index 000000000..0a0a946f1 --- /dev/null +++ b/app/src/main/res/color/library_item_foreground.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/color/nav_selector.xml b/app/src/main/res/color/nav_selector.xml index 8297b43b4..264e2becf 100644 --- a/app/src/main/res/color/nav_selector.xml +++ b/app/src/main/res/color/nav_selector.xml @@ -3,6 +3,6 @@ Based on mtrl_bottom_nav_colored_item_tint --> - - + + diff --git a/app/src/main/res/color/selector_overlay.xml b/app/src/main/res/color/ripple_colored.xml similarity index 57% rename from app/src/main/res/color/selector_overlay.xml rename to app/src/main/res/color/ripple_colored.xml index 69bad1405..71e20d724 100644 --- a/app/src/main/res/color/selector_overlay.xml +++ b/app/src/main/res/color/ripple_colored.xml @@ -1,4 +1,4 @@ - - \ No newline at end of file + + diff --git a/app/src/main/res/color/ripple_toolbar_fainter.xml b/app/src/main/res/color/ripple_toolbar_fainter.xml new file mode 100644 index 000000000..67e2f7f24 --- /dev/null +++ b/app/src/main/res/color/ripple_toolbar_fainter.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/color/source_comfortable_item_title.xml b/app/src/main/res/color/source_comfortable_item_title.xml new file mode 100644 index 000000000..c64350682 --- /dev/null +++ b/app/src/main/res/color/source_comfortable_item_title.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/src/main/res/color/tabs_selector.xml b/app/src/main/res/color/tabs_selector.xml index 4a70bc2f4..7b417175d 100644 --- a/app/src/main/res/color/tabs_selector.xml +++ b/app/src/main/res/color/tabs_selector.xml @@ -6,6 +6,6 @@ it (i.e. blue themes). --> - - + + diff --git a/app/src/main/res/color/tabs_selector_background.xml b/app/src/main/res/color/tabs_selector_background.xml deleted file mode 100644 index 2824c4f0d..000000000 --- a/app/src/main/res/color/tabs_selector_background.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/app/src/main/res/color/text_input_stroke.xml b/app/src/main/res/color/text_input_stroke.xml deleted file mode 100644 index 016705af1..000000000 --- a/app/src/main/res/color/text_input_stroke.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/drawable-v26/sc_collections_bookmark_48dp.xml b/app/src/main/res/drawable-v26/sc_collections_bookmark_48dp.xml index f2fb02a3e..5233c9fe8 100644 --- a/app/src/main/res/drawable-v26/sc_collections_bookmark_48dp.xml +++ b/app/src/main/res/drawable-v26/sc_collections_bookmark_48dp.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/drawable-v26/sc_explore_48dp.xml b/app/src/main/res/drawable-v26/sc_explore_48dp.xml index 9a574c064..61f1e9e39 100644 --- a/app/src/main/res/drawable-v26/sc_explore_48dp.xml +++ b/app/src/main/res/drawable-v26/sc_explore_48dp.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/drawable-v26/sc_history_48dp.xml b/app/src/main/res/drawable-v26/sc_history_48dp.xml index 4ce51f848..3b9cbc93f 100644 --- a/app/src/main/res/drawable-v26/sc_history_48dp.xml +++ b/app/src/main/res/drawable-v26/sc_history_48dp.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/drawable-v26/sc_new_releases_48dp.xml b/app/src/main/res/drawable-v26/sc_new_releases_48dp.xml index 9b8fd1cb6..401d906e5 100644 --- a/app/src/main/res/drawable-v26/sc_new_releases_48dp.xml +++ b/app/src/main/res/drawable-v26/sc_new_releases_48dp.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/drawable/library_item_selector.xml b/app/src/main/res/drawable/library_item_selector.xml index 11714e2ee..074ea244b 100644 --- a/app/src/main/res/drawable/library_item_selector.xml +++ b/app/src/main/res/drawable/library_item_selector.xml @@ -1,42 +1,16 @@ + android:color="?attr/colorPrimary"> + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/app/src/main/res/drawable/library_item_selector_overlay.xml b/app/src/main/res/drawable/library_item_selector_overlay.xml index ac49770e0..4c19540e3 100644 --- a/app/src/main/res/drawable/library_item_selector_overlay.xml +++ b/app/src/main/res/drawable/library_item_selector_overlay.xml @@ -1,21 +1,10 @@ + android:color="?attr/colorPrimary"> - - - - - - - - - - - - - - - + + + + - \ No newline at end of file + diff --git a/app/src/main/res/drawable/list_item_selector.xml b/app/src/main/res/drawable/list_item_selector.xml index 1e2592665..4bdb72600 100644 --- a/app/src/main/res/drawable/list_item_selector.xml +++ b/app/src/main/res/drawable/list_item_selector.xml @@ -1,14 +1,14 @@ + android:color="?attr/colorControlHighlight"> - + - + diff --git a/app/src/main/res/drawable/list_item_selector_background.xml b/app/src/main/res/drawable/list_item_selector_background.xml index e1b1ed5db..26682873a 100644 --- a/app/src/main/res/drawable/list_item_selector_background.xml +++ b/app/src/main/res/drawable/list_item_selector_background.xml @@ -1,14 +1,14 @@ + android:color="?attr/colorControlHighlight"> - + - + diff --git a/app/src/main/res/drawable/reader_seekbar_background.xml b/app/src/main/res/drawable/reader_seekbar_background.xml index f3e97c540..ecb8171f0 100644 --- a/app/src/main/res/drawable/reader_seekbar_background.xml +++ b/app/src/main/res/drawable/reader_seekbar_background.xml @@ -2,5 +2,5 @@ - + diff --git a/app/src/main/res/drawable/reader_seekbar_ripple.xml b/app/src/main/res/drawable/reader_seekbar_ripple.xml index 0c8c0e16b..982f2361e 100644 --- a/app/src/main/res/drawable/reader_seekbar_ripple.xml +++ b/app/src/main/res/drawable/reader_seekbar_ripple.xml @@ -1,6 +1,6 @@ + android:color="?attr/colorControlHighlight"> diff --git a/app/src/main/res/drawable/ripple_background.xml b/app/src/main/res/drawable/ripple_background.xml deleted file mode 100644 index 7c5163602..000000000 --- a/app/src/main/res/drawable/ripple_background.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ripple_regular.xml b/app/src/main/res/drawable/ripple_regular.xml deleted file mode 100644 index d697f5233..000000000 --- a/app/src/main/res/drawable/ripple_regular.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/app/src/main/res/drawable/sc_collections_bookmark_48dp.xml b/app/src/main/res/drawable/sc_collections_bookmark_48dp.xml index ad99bbb47..e14bcd139 100644 --- a/app/src/main/res/drawable/sc_collections_bookmark_48dp.xml +++ b/app/src/main/res/drawable/sc_collections_bookmark_48dp.xml @@ -6,17 +6,17 @@ android:viewportHeight="48"> diff --git a/app/src/main/res/drawable/sc_explore_48dp.xml b/app/src/main/res/drawable/sc_explore_48dp.xml index 1d054fb76..10847d5b7 100644 --- a/app/src/main/res/drawable/sc_explore_48dp.xml +++ b/app/src/main/res/drawable/sc_explore_48dp.xml @@ -6,14 +6,14 @@ android:viewportHeight="48"> diff --git a/app/src/main/res/drawable/sc_history_48dp.xml b/app/src/main/res/drawable/sc_history_48dp.xml index ebf179e4d..2630973ba 100644 --- a/app/src/main/res/drawable/sc_history_48dp.xml +++ b/app/src/main/res/drawable/sc_history_48dp.xml @@ -6,14 +6,14 @@ android:viewportHeight="48"> diff --git a/app/src/main/res/drawable/sc_new_releases_48dp.xml b/app/src/main/res/drawable/sc_new_releases_48dp.xml index ac295ee81..84ee72809 100644 --- a/app/src/main/res/drawable/sc_new_releases_48dp.xml +++ b/app/src/main/res/drawable/sc_new_releases_48dp.xml @@ -6,14 +6,14 @@ android:viewportHeight="48"> diff --git a/app/src/main/res/drawable/selectable_item_background.xml b/app/src/main/res/drawable/selectable_item_background.xml deleted file mode 100644 index dbaebc325..000000000 --- a/app/src/main/res/drawable/selectable_item_background.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/splash_background.xml b/app/src/main/res/drawable/splash_background.xml index c62fb2192..761fbac44 100644 --- a/app/src/main/res/drawable/splash_background.xml +++ b/app/src/main/res/drawable/splash_background.xml @@ -1,7 +1,7 @@ - + - + diff --git a/app/src/main/res/layout-sw720dp/main_activity.xml b/app/src/main/res/layout-sw720dp/main_activity.xml index 697d50fa2..9e357023b 100644 --- a/app/src/main/res/layout-sw720dp/main_activity.xml +++ b/app/src/main/res/layout-sw720dp/main_activity.xml @@ -77,7 +77,7 @@ android:layout_height="0dp" app:elevation="0dp" app:itemIconTint="@color/nav_selector" - app:itemRippleColor="?attr/rippleSecondaryColor" + app:itemRippleColor="?attr/colorControlHighlight" app:itemTextColor="@color/nav_selector" app:labelVisibilityMode="labeled" app:layout_constraintBottom_toBottomOf="parent" @@ -87,7 +87,7 @@ diff --git a/app/src/main/res/layout/categories_item.xml b/app/src/main/res/layout/categories_item.xml index a729e8982..cade6d105 100644 --- a/app/src/main/res/layout/categories_item.xml +++ b/app/src/main/res/layout/categories_item.xml @@ -6,12 +6,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:cardBackgroundColor="?android:attr/colorBackground" - app:cardElevation="0dp"> + app:cardElevation="0dp" + app:cardForegroundColor="@color/draggable_card_foreground"> + android:layout_height="wrap_content"> + app:tabMode="fixed" /> diff --git a/app/src/main/res/layout/download_item.xml b/app/src/main/res/layout/download_item.xml index b353473cb..61c222e69 100644 --- a/app/src/main/res/layout/download_item.xml +++ b/app/src/main/res/layout/download_item.xml @@ -7,12 +7,12 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" app:cardBackgroundColor="?android:attr/colorBackground" - app:cardElevation="0dp"> + app:cardElevation="0dp" + app:cardForegroundColor="@color/draggable_card_foreground"> + android:layout_height="wrap_content"> @@ -98,7 +98,6 @@