Search code examples
androidpopupwindow

How to set the popupwindow background with anchor


I am trying to create a PopupWindow with a anchor(an arrow) like this:

enter image description here

And I have an image for background popup_bg like this:

enter image description here

Now I tried to set the background for the layout of the popupwindow:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/popup_bg">

    <TextView
        android:id="@+id/popText"
        android:text="@string/map_choose_point"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"/>
</RelativeLayout>

But I got this:

enter image description here

How to fix it ?


Solution

  • Try the below example

    1) SuperTooltips

    2) ShowcaseView

    From that first link example look like below image

    enter image description here