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

[PopupMenu] Apply a shapeAppearance style to a PopupMenu

Open
#559 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I am using the latest version

com.google.android.material:material:1.1.0-alpha09

According to [documentation][2] it is possible to customize the component shapes using the **`shapeAppearanceOverlay`** attribute in the style.
These components should be supported:

- Bottom Sheet
- Button
- Floating Action Button
- Card
- Chip
- Dialog
- Menu
- Text Field

I am able to apply the attribute to these components except the [Menu][3], in particular `PopupMenu`. I was looking for it in the material themes but I didn't find it.
I tried something like that, but it doesn't work:



<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.MyApp.PopupMenu</item>



<item name="cornerFamily">cut</item>
<item name="cornerSize">32dp</item>

[1]: https://github.com/material-components/material-components-android
[2]: https://github.com/material-components/material-components-android/blob/master/docs/theming/Shape.md#supported-components
[3]: https://github.com/material-components/material-components-android/blob/master/docs/components/Menu.md

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 Shape.md and Menu.md documentation, then trace how PopupMenu styles are defined and applied. Done means a PopupMenu can use the documented shapeAppearanceOverlay customization, with the relevant behavior covered by the project's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
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.