material-components / material-components/material-components-android
[MaterialCardView] Stroke not correctly overlapping corners
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** When using MaterialCardView with a StrokeColor and StrokeWidth set, the rendered stroke does not fully overlap rounded corners.
**Expected behavior:** The stroke should correctly overlap all corners
**Source code:**
layout:
```
```
styles:
```
<item name="cardCornerRadius">32dp</item>
<item name="cardBackgroundColor">#ffffff</item>
<item name="strokeColor">#efefef</item>
<item name="strokeWidth">1dp</item>
<item name="cardElevation">0dp</item>
```
**Android API version:** Reproducible with API 29 to 21.
**Material Library version:** Reproducible with 1.1.0-rc1 and 1.2.0-alpha03
**Device:** Emulator and real devices (Pixel 1 e.g.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the supplied MaterialCardView XML and AppCard style on API 21–29, using the stated Material library versions. Inspect the MaterialCardView stroke and rounded-corner rendering path, then verify that the stroke overlaps every corner as expected in the provided screenshot scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- design, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100