mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-13 14:02:49 +01:00
562dce60ee
* Create drawables for the ripples
Temporary colors in them to aid in unifying the ripples.
The 'ripple_circular' and 'ripple_normal' are probably going to be merge as one in the end.
* Change selectableItems to drawables
Changes 'selectableItemBackgroundBorderless' to 'ripple_circular' drawable.
Changes 'selectableItemBackground' to 'selectable_item_background' drawable.
* Add temporary colors to aid in finding unstyled ripples
* Fix button sizes to not make oval ripples
* Make the chip selectable follow ripple color
* Style using the built in rippleColor when possible
* Ripple away 💸
* Set ripple color for tabs
Main activity tabs as well as sheet tabs
* Set ripple color in seekbar buttons
* Fix ripple color for the toolbar
* Round off and start to finish the ripples
* Set custom colorful ripple for bottom navigation
Makes the app a little more fun than just black and white. Took inspiration from a ton of updated Google apps.
* Revert two layout changes
These were not necessary for the ripple as it is designed now, but it was before.
Co-authored-by: Andreas E <andreas.everos@gmail.com>
269 lines
14 KiB
XML
269 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<!--============-->
|
|
<!-- Base Theme -->
|
|
<!--============-->
|
|
<style name="Theme"/>
|
|
|
|
<!--==============-->
|
|
<!-- Light Themes -->
|
|
<!--=======-======-->
|
|
<style name="Theme.Base" parent="Theme.MaterialComponents.Light.NoActionBar">
|
|
<!-- AppBar -->
|
|
<item name="windowActionBar">false</item>
|
|
<item name="windowNoTitle">true</item>
|
|
|
|
<item name="android:forceDarkAllowed" tools:targetApi="Q">false</item>
|
|
|
|
<!-- Theme colors -->
|
|
<item name="colorPrimary">@color/md_white_1000</item>
|
|
<item name="colorOnPrimary">@color/md_black_1000</item>
|
|
<item name="colorAccentOnPrimary">@color/colorAccentLight</item>
|
|
<item name="colorPrimaryVariant">@color/md_white_1000</item>
|
|
<item name="colorSecondary">@color/colorAccentLight</item>
|
|
<item name="colorOnSecondary">@color/md_white_1000</item>
|
|
<item name="colorSurface">@color/dialogLight</item>
|
|
<item name="colorOnSurface">@color/textColorPrimaryLight</item>
|
|
<item name="colorOnBackground">@color/textColorPrimaryLight</item>
|
|
<item name="colorAccent">@color/colorAccentLight</item>
|
|
|
|
<!-- Base background/text colors -->
|
|
<item name="android:colorBackground">@color/backgroundLight</item>
|
|
<item name="android:textColorPrimary">@color/textColorPrimaryLight</item>
|
|
<item name="android:textColorSecondary">@color/textColorSecondaryLight</item>
|
|
<item name="android:textColorHint">@color/textColorHintLight</item>
|
|
<item name="android:textColorPrimaryInverse">@color/textColorPrimaryDark</item>
|
|
<item name="android:textColorSecondaryInverse">@color/textColorSecondaryDark</item>
|
|
<item name="android:textColorHintInverse">@color/textColorHintDark</item>
|
|
<item name="rippleColor">@color/rippleColorLight</item>
|
|
<item name="rippleNavColor">@color/rippleNavColorLight</item>
|
|
<item name="android:colorEdgeEffect">?attr/colorAccent</item>
|
|
|
|
<item name="android:divider">@color/dividerLight</item>
|
|
<item name="android:listDivider">@drawable/line_divider</item>
|
|
|
|
<!-- Handles RTL text -->
|
|
<item name="android:textAlignment">gravity</item>
|
|
<item name="android:textDirection">locale</item>
|
|
|
|
<!-- Themes -->
|
|
<item name="android:statusBarColor">@color/md_black_1000</item>
|
|
<item name="android:navigationBarColor">@color/md_black_1000</item>
|
|
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">@null</item>
|
|
<item name="android:enforceNavigationBarContrast" tools:targetApi="Q">false</item>
|
|
<item name="windowActionModeOverlay">true</item>
|
|
<item name="elevationOverlayEnabled">false</item>
|
|
<item name="actionModeStyle">@style/Theme.ActionMode</item>
|
|
<item name="actionModeCloseButtonStyle">@style/Theme.ActionMode.CloseButton</item>
|
|
<item name="actionModeCloseDrawable">@drawable/ic_close_24dp</item>
|
|
<item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents</item>
|
|
<item name="toolbarNavigationButtonStyle">@style/Theme.Toolbar.Navigation</item>
|
|
<item name="preferenceTheme">@style/PreferenceThemeLight</item>
|
|
<item name="dialogTheme">@style/Theme.AlertDialog.Light</item>
|
|
<item name="materialAlertDialogTheme">@style/Theme.AlertDialog.Light</item>
|
|
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
|
|
<item name="chipStyle">@style/Theme.Widget.Chip</item>
|
|
<item name="buttonStyle">@style/Theme.Widget.Button</item>
|
|
<item name="snackbarStyle">@style/Theme.Widget.Snackbar</item>
|
|
<item name="snackbarButtonStyle">@style/Theme.Widget.Button</item>
|
|
<item name="snackbarTextViewStyle">@style/Theme.Widget.Snackbar.TextView</item>
|
|
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
|
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
|
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
|
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
|
<item name="circularProgressIndicatorStyle">@style/Theme.Widget.CircularProgressIndicator</item>
|
|
<item name="linearProgressIndicatorStyle">@style/Theme.Widget.LinearProgressIndicator</item>
|
|
|
|
<!-- Material Dialogs -->
|
|
<item name="md_background_color">?attr/colorSurface</item>
|
|
<item name="md_color_title">?attr/colorOnSurface</item>
|
|
<item name="md_color_content">?attr/colorOnSurface</item>
|
|
<item name="md_color_button_text">?attr/colorAccent</item>
|
|
<item name="md_button_casing">literal</item>
|
|
<item name="md_corner_radius">@dimen/dialog_radius</item>
|
|
|
|
<!-- Custom Attributes-->
|
|
<item name="colorLibrarySelection">?attr/colorAccent</item>
|
|
<item name="colorLibrarySelectionActive">@color/selectorColorLight</item>
|
|
<item name="colorFilterActive">@color/filterColorLight</item>
|
|
</style>
|
|
|
|
<!--===========-->
|
|
<!-- Main Theme-->
|
|
<!--===========-->
|
|
<style name="Base.Theme.Tachiyomi.Light" parent="Theme.Base">
|
|
<item name="android:statusBarColor">?attr/colorPrimary</item>
|
|
<item name="android:windowLightStatusBar">true</item>
|
|
</style>
|
|
<style name="Theme.Tachiyomi.Light" parent="Base.Theme.Tachiyomi.Light" />
|
|
|
|
<style name="Theme.Tachiyomi.Light.Blue">
|
|
<item name="colorPrimary">@color/colorPrimary</item>
|
|
<item name="colorOnPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="colorAccentOnPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="colorPrimaryVariant">@color/colorPrimaryDark</item>
|
|
<item name="colorFilterActive">@color/filterColorDark</item>
|
|
<item name="actionBarTheme">@style/Theme.Toolbar.Light</item>
|
|
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
|
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
|
|
</style>
|
|
|
|
<!--=============-->
|
|
<!-- Dark Themes -->
|
|
<!--=============-->
|
|
<style name="Theme.Base.Dark" parent="Theme.MaterialComponents.NoActionBar">
|
|
<!-- Theme colors -->
|
|
<item name="colorPrimary">@color/colorDarkPrimary</item>
|
|
<item name="colorOnPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="colorAccentOnPrimary">@color/colorAccentDark</item>
|
|
<item name="colorPrimaryVariant">@color/colorDarkPrimary</item>
|
|
<item name="colorSecondary">@color/colorAccentDark</item>
|
|
<item name="colorOnSecondary">@color/textColorPrimaryDark</item>
|
|
<item name="colorSurface">@color/dialogDark</item>
|
|
<item name="colorOnSurface">@color/textColorPrimaryDark</item>
|
|
<item name="colorOnBackground">@color/textColorPrimaryDark</item>
|
|
<item name="colorAccent">@color/colorAccentDark</item>
|
|
|
|
<!-- Handles RTL text -->
|
|
<item name="android:textAlignment">gravity</item>
|
|
<item name="android:textDirection">locale</item>
|
|
|
|
<!-- Base background/text colors -->
|
|
<item name="android:colorBackground">@color/backgroundDark</item>
|
|
<item name="android:textColorPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="android:textColorSecondary">@color/textColorSecondaryDark</item>
|
|
<item name="android:textColorHint">@color/textColorHintDark</item>
|
|
<item name="android:textColorPrimaryInverse">@color/textColorPrimaryLight</item>
|
|
<item name="android:textColorSecondaryInverse">@color/textColorSecondaryLight</item>
|
|
<item name="android:textColorHintInverse">@color/textColorHintLight</item>
|
|
<item name="rippleNavColor">@color/rippleNavColorDark</item>
|
|
<item name="rippleColor">@color/rippleColorDark</item>
|
|
<item name="android:colorEdgeEffect">?attr/colorAccent</item>
|
|
|
|
<item name="android:divider">@color/dividerDark</item>
|
|
<item name="android:listDivider">@drawable/line_divider</item>
|
|
|
|
<!-- Themes -->
|
|
<item name="android:statusBarColor">?attr/colorPrimary</item>
|
|
<item name="android:navigationBarColor">?attr/colorPrimary</item>
|
|
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">@null</item>
|
|
<item name="android:enforceNavigationBarContrast" tools:targetApi="Q">false</item>
|
|
<item name="windowActionModeOverlay">true</item>
|
|
<item name="elevationOverlayEnabled">false</item>
|
|
<item name="actionModeStyle">@style/Theme.ActionMode</item>
|
|
<item name="actionModeCloseButtonStyle">@style/Theme.ActionMode.CloseButton</item>
|
|
<item name="actionModeCloseDrawable">@drawable/ic_close_24dp</item>
|
|
<item name="actionBarTheme">@style/Theme.Toolbar.Custom</item>
|
|
<item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents</item>
|
|
<item name="toolbarNavigationButtonStyle">@style/Theme.Toolbar.Navigation</item>
|
|
<item name="preferenceTheme">@style/PreferenceThemeDark</item>
|
|
<item name="dialogTheme">@style/Theme.AlertDialog.Dark</item>
|
|
<item name="materialAlertDialogTheme">@style/Theme.AlertDialog.Dark</item>
|
|
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
|
|
<item name="chipStyle">@style/Theme.Widget.Chip</item>
|
|
<item name="buttonStyle">@style/Theme.Widget.Button</item>
|
|
<item name="snackbarStyle">@style/Theme.Widget.Snackbar</item>
|
|
<item name="snackbarButtonStyle">@style/Theme.Widget.Button</item>
|
|
<item name="snackbarTextViewStyle">@style/Theme.Widget.Snackbar.TextView</item>
|
|
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
|
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
|
|
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
|
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorAccent</item>
|
|
<item name="circularProgressIndicatorStyle">@style/Theme.Widget.CircularProgressIndicator</item>
|
|
<item name="linearProgressIndicatorStyle">@style/Theme.Widget.LinearProgressIndicator</item>
|
|
|
|
<!-- Material Dialogs -->
|
|
<item name="md_background_color">?attr/colorSurface</item>
|
|
<item name="md_color_title">?attr/colorOnSurface</item>
|
|
<item name="md_color_content">?attr/colorOnSurface</item>
|
|
<item name="md_color_button_text">?attr/colorAccent</item>
|
|
<item name="md_button_casing">literal</item>
|
|
<item name="md_corner_radius">@dimen/dialog_radius</item>
|
|
|
|
<!-- Custom Attributes-->
|
|
<item name="colorLibrarySelection">?attr/colorAccent</item>
|
|
<item name="colorLibrarySelectionActive">@color/selectorColorDark</item>
|
|
<item name="colorFilterActive">@color/filterColorDark</item>
|
|
</style>
|
|
|
|
<style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark" />
|
|
|
|
<style name="Theme.Tachiyomi.Dark.Blue">
|
|
<item name="colorPrimary">@color/colorPrimary</item>
|
|
<item name="colorAccentOnPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="colorPrimaryVariant">@color/colorPrimary</item>
|
|
</style>
|
|
|
|
<style name="Theme.Tachiyomi.Dark.Amoled">
|
|
<item name="colorPrimary">@color/colorAmoledPrimary</item>
|
|
<item name="colorPrimaryVariant">@color/colorAmoledPrimary</item>
|
|
<item name="colorSurface">@color/colorAmoledPrimary</item>
|
|
|
|
<item name="android:colorBackground">@color/colorAmoledPrimary</item>
|
|
|
|
<!-- Some ROMs make black navbars white (e.g. OxygenOS) -->
|
|
<item name="android:navigationBarColor">#000001</item>
|
|
|
|
<!-- Custom Attributes-->
|
|
<item name="colorLibrarySelection">@color/selectorColorDark</item>
|
|
<item name="colorLibrarySelectionActive">@color/selectorColorDark</item>
|
|
</style>
|
|
|
|
<!--==============-->
|
|
<!-- Reader Theme -->
|
|
<!--==============-->
|
|
<style name="Theme.Base.Reader.Dark" parent="Theme.Base.Dark">
|
|
<item name="colorPrimary">@color/readerColorDarkPrimary</item>
|
|
<item name="colorOnPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="colorPrimaryVariant">@color/readerColorDarkPrimary</item>
|
|
<item name="colorSurface">@color/md_black_1000</item>
|
|
|
|
<item name="android:colorBackground">@color/md_black_1000</item>
|
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
|
<item name="android:navigationBarColor">?attr/colorPrimaryVariant</item>
|
|
|
|
<item name="actionBarTheme">@style/Theme.Toolbar.Custom</item>
|
|
<item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents</item>
|
|
<item name="switchStyle">@style/Theme.Widget.BasicSwitch</item>
|
|
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
|
|
</style>
|
|
|
|
<style name="Theme.Base.Reader.Light" parent="Theme.Base">
|
|
<item name="colorPrimary">@color/readerColorDarkPrimary</item>
|
|
<item name="colorOnPrimary">@color/textColorPrimaryDark</item>
|
|
<item name="colorPrimaryVariant">@color/readerColorDarkPrimary</item>
|
|
<item name="colorSurface">@color/md_white_1000</item>
|
|
|
|
<item name="android:colorBackground">@color/md_white_1000</item>
|
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
|
<item name="android:navigationBarColor">?attr/colorPrimaryVariant</item>
|
|
|
|
<item name="actionBarTheme">@style/Theme.Toolbar.Custom</item>
|
|
<item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents</item>
|
|
<item name="switchStyle">@style/Theme.Widget.BasicSwitch</item>
|
|
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
|
|
</style>
|
|
|
|
<style name="Theme.Reader.Dark" parent="Theme.Base.Reader.Dark" />
|
|
|
|
<style name="Theme.Reader.Dark.Grey" parent="Theme.Base.Reader.Dark">
|
|
<item name="android:colorBackground">@color/backgroundDark</item>
|
|
</style>
|
|
|
|
<style name="Theme.Reader.Light" parent="Theme.Base.Reader.Light" />
|
|
|
|
|
|
<!--===============-->
|
|
<!-- Launch Screen -->
|
|
<!--===============-->
|
|
<style name="Theme.Splash" parent="Theme.Tachiyomi.Light.Blue">
|
|
<item name="colorBackgroundSplash">@color/colorPrimary</item>
|
|
|
|
<item name="android:windowBackground">@drawable/splash_background</item>
|
|
<item name="android:statusBarColor">?attr/colorBackgroundSplash</item>
|
|
<item name="android:navigationBarColor">?attr/colorBackgroundSplash</item>
|
|
</style>
|
|
|
|
</resources>
|