title: Android: How to add a context menu to the item of a gridview?
body: <p>I have a grid view , it's item  is formed by an icon and tow textview. the code of my item is given below. I would like  to add a context menu for each item, like this used in google playstore as mentioned by the image <a href="http://s30.postimg.org/z070fez5t/googleplay.png" rel="nofollow">link for the image</a></p>
  
  <pre><code>&lt;RelativeLayout
          android:id="@+id/relativeLayout1"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:background="@drawable/round_boutton"
          android:orientation="vertical"
          android:padding="5dp"&gt;
      &lt;ImageView
              android:layout_height="96dp"
              android:id="@+id/imageView1"
              android:layout_width="96dp"
              android:src="@drawable/icon"
              android:layout_marginTop="15dp"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="15dp"
              android:layout_alignParentTop="true"
              android:layout_centerHorizontal="true"&gt;
      &lt;/ImageView&gt;
      &lt;LinearLayout
              android:id="@+id/l1"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@+id/imageView1"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="15dp"
              android:layout_marginTop="15dp"
              android:orientation="vertical" &gt;
          &lt;TextView
                  android:id="@+id/textView1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="4dp"
                  android:paddingTop="4dp"
                  android:singleLine="true"
                  android:text="TextView1"
                  android:textColor="@color/orangemill"
                  android:layout_weight="1"
                  android:textSize="14dip" &gt;
          &lt;/TextView&gt;
  
          &lt;TextView
                  android:id="@+id/textView2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="10dp"
                  android:textColor="@color/white"
                  android:maxLines="2"
                  android:layout_weight="1"
                  android:text="TextView2" &gt;
          &lt;/TextView&gt;
  
      &lt;/LinearLayout&gt;
      &lt;View
              android:layout_width="fill_parent"
              android:layout_height="1dp"
              android:layout_below="@+id/l1"
              android:background="@android:color/transparent" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>