Ziem Ziem - 1 year ago 309
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 Source

Setting android:dropDownVerticalOffset allowed me to overlap anchor view:

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

<style name="PopupMenu" parent="@style/Widget.AppCompat.Light.PopupMenu">
    <item name="android:dropDownVerticalOffset">-36dip</item>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download