Ripple overhaul (#5109)
* 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>
This commit is contained in:
@@ -6,10 +6,14 @@
|
||||
<!--========-->
|
||||
<style name="Theme.Toolbar" parent="@style/ThemeOverlay.MaterialComponents.ActionBar" />
|
||||
|
||||
<style name="Theme.Toolbar.Light" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
|
||||
<style name="Theme.Toolbar.Light" parent="Theme.Toolbar.Custom">
|
||||
<item name="popupTheme">@style/ThemeOverlay.MaterialComponents.Light</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Toolbar.Custom" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
|
||||
<item name="android:colorControlHighlight">?attr/rippleColor</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Toolbar.Navigation" parent="Widget.AppCompat.Toolbar.Button.Navigation">
|
||||
<item name="tint">?attr/colorOnPrimary</item>
|
||||
</style>
|
||||
@@ -227,9 +231,13 @@
|
||||
<style name="Theme.Widget.Chip" parent="Widget.MaterialComponents.Chip.Action">
|
||||
<item name="chipStrokeWidth">1dp</item>
|
||||
<item name="chipStrokeColor">?attr/colorAccent</item>
|
||||
<item name="chipBackgroundColor">@android:color/transparent</item>
|
||||
<item name="chipBackgroundColor">@color/background_color_chip_state</item>
|
||||
<item name="android:textColor">?attr/colorAccent</item>
|
||||
|
||||
<!-- Custom chip states -->
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
|
||||
<!-- Smaller text/height -->
|
||||
<item name="chipCornerRadius">12dp</item>
|
||||
<item name="chipMinHeight">24dp</item>
|
||||
@@ -284,14 +292,14 @@
|
||||
<!--==============-->
|
||||
<style name="Theme.Widget.Button" parent="Widget.MaterialComponents.Button.TextButton">
|
||||
<item name="android:textColor">?attr/colorAccent</item>
|
||||
<item name="rippleColor">?attr/colorAccent</item>
|
||||
<item name="rippleColor">?attr/rippleColor</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Widget.Button.FilledAccent" parent="Widget.MaterialComponents.Button">
|
||||
<item name="android:textColor">?attr/colorOnSecondary</item>
|
||||
<item name="backgroundTint">?attr/colorAccent</item>
|
||||
<item name="rippleColor">?attr/colorAccent</item>
|
||||
<item name="rippleColor">?attr/rippleColor</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
@@ -358,4 +366,16 @@
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!--===============-->
|
||||
<!--Custom Selector-->
|
||||
<!--===============-->
|
||||
<style name="PreferenceThemeLight" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="android:selectableItemBackground">@drawable/ripple_light</item>
|
||||
</style>
|
||||
|
||||
<style name="PreferenceThemeDark" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="android:selectableItemBackground">@drawable/ripple_dark</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user