[CardView] rippes on click do not fill the corner
See original GitHub issueDescription: I’ve changed the shapeAppearance
of a CardView
to a style which alters the edges. When clicking the card, the ripples do not reach the very edge anymore. It’s ending in a rectangle without any shaped corners.
Expected behavior: The ripples should reach the edges just like they do when I don’t change the shapeAppearance
.
Source code:
<com.google.android.material.card.MaterialCardView
style="@style/NoCornerBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<style name="NoCornerBottom" parent="">
<item name="shapeAppearance">@style/ShapeAppearance.NoCornerBottom</item>
</style>
<style name="ShapeAppearance.NoCornerBottom" parent="ShapeAppearance.MaterialComponents.MediumComponent">
<item name="cornerSizeBottomRight">0dp</item>
<item name="cornerSizeBottomLeft">0dp</item>
</style>
Android API version: minSdkVersion 21
, targetSdkVersion 28
Material Library version: 1.1.0-alpha08
Device: Pixel 3 with Android Q Beta 4
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Ripple effect on Android Lollipop CardView - Stack Overflow
Works on lollipop with ripple effect but only gives solid color when run on older platforms. Good enough for me :) ... Working...
Read more >Cards - Material Design
When a card is checked, it will show a checked icon and change its foreground color. There is no default behavior for enabling/disabling...
Read more >CardView using RecyclerView in Android with Example
For creating a Card Layout navigate to the app > res > layout > Right-Click on it > New > Layout Resource File...
Read more >Manage your digital assets using Experience Manager Assets
Click Create. Your folder is displayed in the digital assets folder. The following (space-separated list of) characters are not supported: asset ...
Read more >Card | Angular Material
The <mat-card> element itself does not add any padding around its content. This allows developers to customize the padding to their liking by...
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
Awesome that was my guess, If you ran into problems with images or something inside the card you will have to implement the suggested workarounds until we bake the fixes into CardView
Ok, no changes needed -
MaterialCardView
works just fine.It was my fault of having the actual clickable item inside the card with its own background (which was the plain rectangle on the screenshots). Removing this and just let the card do it’s thing resolves my problem.
Thank you.