material-components / material-components/material-components-android

[MaterialCardView] Stroke not correctly overlapping corners

Open
#881 7 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Good First Issue Widget: Card
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.
Bildschirmfoto 2020-01-07 um 18 29 48
**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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.