title: How to show popupWindow at underneath TextView
body: <p>I want to be able to show my PopupWindow underneath my TextView. I have followed tutorials and still unable to get it to display where I want it to. </p>
  
  <p><a href="https://i.stack.imgur.com/jzgO6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jzgO6.png" alt="enter image description here"></a></p>
  
  <p>I want it to show underneath the Key (TextView). </p>
  
  <p>My Xml Layout: </p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
              android:id="@+id/layout_master"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              tools:context="com.example.test.myview.MainActivity"&gt;
  
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"&gt;
  
                          &lt;TextView
                              android:id="@+id/textView0"
                              android:layout_width="wrap_content"
                              android:layout_height="match_parent"
                              android:gravity="center"
                              android:layout_marginLeft="10dp"
                              android:text="Options" /&gt;
  
                          &lt;Spinner
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:id="@+id/tagSpinner" /&gt;
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"&gt;
  
                          &lt;TextView
                              android:id="@+id/textView1"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginLeft="10dp"
                              android:text="sampleTxt" /&gt;
  
                          &lt;EditText
                              android:id="@+id/tagKey"
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="1"
                              android:ems="10"
                              android:hint="Type me.."&gt;&lt;/EditText&gt;
                  &lt;/LinearLayout&gt;
  
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"&gt;
  
                          &lt;TextView
                              android:id="@+id/textView2"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginLeft="10dp"
                              android:text="value" /&gt;
  
                          &lt;EditText
                              android:id="@+id/tagval"
                              android:layout_width="0dp"
                              android:layout_height="wrap_content"
                              android:layout_weight="1"
                              android:ems="10"
                              android:hint="Enter value"/&gt;
                  &lt;/LinearLayout&gt;
  
                  &lt;Button
                      android:text="Button"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:onClick="btnclick"
                      android:id="@+id/aaaa" /&gt;
  
          &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Edit: I also don't mind if it gets cut off Screen</p>