Material 设计 2 的弹出菜单

Popup menu with Material Design 2

我有一个这样创建的弹出菜单:

val popup = PopupMenu(this, more_button) 
popup.menuInflater.inflate(R.menu.menu_options, popup.menu) 
popup.setOnMenuItemClickListener(this) 
popup.show()

但我似乎无法找到如何创建具有圆角边缘的 Popup,就像新的 Google Chrome 具有右上角的 "more button" 一样。

如何基于新的 Material 设计 2 创建弹出菜单?

更新

使用新的 com.google.android.material:material:1.1.0-alpha03Theme.MaterialComponents 主题,所有 PopupMenu 都将具有 Mateiral Design2 外观。当 material-1.1.0 结束时,我们将拥有它们。

旧答案

How do I create a Popup menu based on the new Material Design 2?

有第三方库MaterialPopupMenu

Google 已计划创建所有 material 个组件,但似乎需要很长时间。

顺便说一句,Google Chrome 手动创建弹出菜单。圆角只是一个 .9.png 文件。 code and popup_bg