0

I am stuck with the problem on how to make a custom style for Popup Menu.

All I got is this kind of Popup Menu:

This is running on an Marshmallow emulator.

I don't have a custom style for this because I don't really know how to do it.

enter image description here

And here is my popup.xml file,

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
    android:id="@+id/popupMenuEditItem"
    android:icon="@drawable/edit"
    android:title="Edit Item" />

<item
    android:id="@+id/popupMenuDeleteItem"
    android:icon="@drawable/fab_menu_delete"
    android:title="Delete Item" />

</menu> 

My goal is to have this popup menu,

enter image description here

Anyone know how to do it? I would really appreciate any help. Thanks! :)

Chris Palma
  • 223
  • 1
  • 2
  • 13

1 Answers1

1

you can have custom popup window in this case which will automatically get popup below or above view depending upon the clicked view position.

Reference link: https://developer.android.com/reference/android/widget/PopupWindow.html

Anjali
  • 1
  • 1
  • 13
  • 20