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:
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:
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>
Create a layout file like
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="250dp">
<RelativeLayout
android:id="@+id/rlv1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/rectangle_shape">
</RelativeLayout>
</RelativeLayout>
And finally inside rlv1 relativelayout page your code , and fix if any margin issue arise