Ziem Ziem - 2 months ago 33
Android Question

How to force PopupMenu to overlap anchor?

How to force PopupMenu to overlap anchor? I would like to recreate something similar to this:

Menus usage

Answer

Setting android:dropDownVerticalOffset allowed me to overlap anchor view:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="popupMenuStyle">@style/PopupMenu</item>
</style>

<style name="PopupMenu" parent="@style/Widget.AppCompat.Light.PopupMenu">
    <item name="android:dropDownVerticalOffset">-36dip</item>
</style>
Comments