How to create custom popup menu with pointer in android

I want to create a popup menu with a pointer to show which record is showing in the popup.

I’ve tried to custom Dialog from this link but it doesn’t show a pointer.

What I want is something like the image below:

Image example

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jason
Guest

Use the background like this. It should work Create a drawable.xml file “rectangle_shape.xml” <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:fillColor="#FFFFFF" android:pathData=" M2,2 C2,2 2,1 3,1 L 21,1 C21,1 22,1 22,2 L 22,21 C22,21 22,22 21,22 L 14,22 L 12,24 L 10,22 C3,22 2,22 2,21 Z" android:strokeWidth="0.2" android:strokeColor="#dadada" /> </vector>