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

[MaterialShapeDrawable] Unable to add gradient to MaterialShapeDrawable

Open
#1,167 9 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Feature: Shape
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
A have a lot of cases when I need to use a gradient with material shapes, but I can't do it because
MaterialShapeDrawable used the only fillColor.
If I want to use gradient or another drawable view with MaterialShapeDrawable becomes black.

**Describe the solution you'd like**
Add the possibility to use drawables with MaterialShapeDrawable.

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

The issue names MaterialShapeDrawable but no file or test. Start by reading that class and the issue discussion to understand the current fillColor rendering and requested drawable behavior; done means gradients or other drawables render correctly instead of black.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
design, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.