[Widget.MaterialComponents.Button.TextButton] `rippleColor` is not working when set from styles for `MaterialAlertDialog`
See original GitHub issueRippleColor is not working for MaterialAlertDialog
I had setup a theme as:
<style name="Material.Dialog.Alert" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="buttonBarPositiveButtonStyle">
@style/Material.Dialog.Alert.Button.Positive
</item>
</style>
for the MaterialAlertDialog
:
<item name="materialAlertDialogTheme">@style/Material.Dialog.Alert</item>
and a TextButton
styles as:
<style name="Material.Dialog.Alert.Button.Positive" parent="Widget.MaterialComponents.Button.TextButton">
<item name="rippleColor">@color/link_primary</item> //This property doesnt have any effect
<item name="android:textColor">@color/link_primary</item>
</style>
Parent theme: Theme.MaterialComponents.Light.NoActionBar.Bridge
Android API version: 21, 25, 28, 29
Material Library version: com.google.android.material:material:1.1.0-alpha04
(Didnt see any fix on the new releases documentation though)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
MaterialComponents theme alert dialog buttons - Stack Overflow
I figured out what was causing this problem. I need to use different AlertDialog class: androidx.appcompat.app.AlertDialog.
Read more >Android Material Components - MaterialAlertDialog
Basic Implementation. Now let's create a basic MaterialAlertDialog using the Builder pattern: · Styled Buttons. We can style the buttons of ...
Read more >Material Design — Custom Alert Dialog | by lcdsmao - Medium
Create a custom alert dialog theme that inherited from ThemeOverlay.MaterialComponents.MaterialAlertDialog: Then you can then customize the style of the ...
Read more >android - MaterialComponents theme alert dialog buttons - Stack ...
But now I have a problem, in this pages there's a note ... <style name="Alert.Button.Positive" parent="Widget.MaterialComponents.Button.TextButton"> <item ...
Read more >Tips and Tricks for Android Material Support Library 2
Everyone likes a satisfying ripple effect on buttons, and for everything else ... Material Support Library, you'll need a broader solution to this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is not working with the latest version (
1.2.0-alpha03
) too if the parent theme isTheme.MaterialComponents.Light.NoActionBar.Bridge
It works, if parent theme is
Theme.MaterialComponents.Light.NoActionBar
thoughI mean the ripple effect for
MaterialAlertDialog
is not working at all (even the default one -mtrl_btn_text_btn_ripple_color.xml
) when the parent theme is set toTheme.MaterialComponents.Light.NoActionBar.Bridge
+1 to Gabriele’s answer. I’m going to close the issue. : )