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

[MaterialCardView] Large MaterialCardView with cornerSizeTopRight=24dp is not rendered on small screens

Open
#1,717 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: Card
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Description: We're using large MaterialCardView with rounded top corners inside a NestedScrollView. When testing on emulator representing an old phone (API 21, Nexus S, 480*800) we discovered that MaterialCardView just isn't rendered on the screen. Further investigation showed this only happens with certain values for cornerSizeTopRight attribute (24dp, 48dp).
cardview_bug

Expected behavior:
cardview_expected

Sample project: https://github.com/gmk57/TestCardView

Android API version: 21 (not reproduced on API 23, 25, 29)

Material Library version: 1.2.1, 1.3.0-alpha02

Device: Android Emulator representing Nexus S

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 with the linked TestCardView sample project and reproduce the issue on an API 21 Nexus S emulator using a large MaterialCardView inside a NestedScrollView. Compare cornerSizeTopRight values such as 24dp and 48dp with newer API levels, then trace the MaterialCardView rendering path. Done means the card renders correctly on the reported small screen without regressing newer APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.