[PopupMenu] Apply a shapeAppearance style to a PopupMenu
See original GitHub issueI am using the latest version
com.google.android.material:material:1.1.0-alpha09
According to documentation 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, 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:
<!-- Popup Menu -->
<style name="Widget.MyApp.PopupMenu" parent="@style/Widget.MaterialComponents.PopupMenu">
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.MyApp.PopupMenu</item>
</style>
<style name="ShapeAppearanceOverlay.MyApp.PopupMenu" parent="">
<item name="cornerFamily">cut</item>
<item name="cornerSize">32dp</item>
</style>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
android - Apply a shapeAppearance style to a PopupMenu
I am able to apply the attribute to these components except the Menu, in particular PopupMenu . I was looking for it in...
Read more >PopupMenu - Android Developers
A PopupMenu displays a Menu in a modal popup window anchored to a View . The popup will appear below the anchor view...
Read more >Migrating to Material Components for Android
This guide will show you how to migrate your codebase so you can make use of the new attributes, styles, and widgets.
Read more >Change how graphs look in Grapher on Mac - Apple Support
Click the Coloring pop-up menu, choose a coloring style, then click the ... To change the shape's appearance, select the shape, then click...
Read more >Popup Menu in Android With Example - GeeksforGeeks
In android, Menu is an important part of the UI component which is used to provide some common functionality around the application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please support this. I am using the Solid Explorer and they customized it. It looks is so nice.
Just a side note: As expected, setting custom popup background (AKA the “hack”) no longer works with M3.