title: How to create three dot button on the top right of an item on an android listview?
body: <p>Like this</p>
  
  <p><img src="https://i.stack.imgur.com/q5z8K.jpg" alt="enter image description here"></p>
  
  <p>If you click the button a menu will drop down. I use <code>ListView</code> to implement, but I don't know how to attach the three-dot-button and add a pop-up menu.</p>
  
  <p>Here is my list_item.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="?android:attr/listPreferredItemHeight" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginBottom="4dp"
          android:layout_marginLeft="6dp"
          android:layout_marginRight="6dp"
          android:layout_marginTop="4dp"
          android:background="@drawable/card_background" &gt;
  
          &lt;TextView
              android:id="@+id/tvMain"
              android:layout_width="0dip"
              android:layout_height="wrap_content"
              android:layout_gravity="left|center_vertical"
              android:layout_weight="1"
              android:textColor="@android:color/primary_text_light" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>And the screenshot of my app:</p>
  
  <p><a href="https://www.dropbox.com/s/h2ko2ctfn5ohmf9/Screenshot_2013-09-10-15-43-57.png" rel="nofollow noreferrer">https://www.dropbox.com/s/h2ko2ctfn5ohmf9/Screenshot_2013-09-10-15-43-57.png</a></p>