title: Android tablelayout click listener for cell content
body: <p>I have a 3x3 gridview with custom linearlayouts within. But I want something like this
  <a href="http://www.mkyong.com/wp-content/uploads/2011/12/android-tablelayout-demo1.png" rel="nofollow">layout</a> and as I search on the internet it's not possible with gridview because of the column span. I used gridview because of the onClickListener method: when the user click on one of the grid cell, a new activity starts(not the same activity, so it's like a main menu). Is it possible to do in a TableLayout? So if I click on a cell even if it spanned can I call an onClick method? I've searched the web for some solutions, but all of what I've found is clicking on a tablerow(which is not good for me if there is 3 custom layouts in one row).</p>
  
  <p>My layout for the TableLayout:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="@android:color/background_light"
  android:orientation="vertical" &gt;
  
  &lt;ImageView
      android:id="@+id/headerPicture"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:contentDescription="@string/imageString"
      android:src="@drawable/bicaj" /&gt;
  
  &lt;TableLayout
      android:id="@+id/mainGrid"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:numColumns="3" &gt;
  
      &lt;TableRow
          android:id="@+id/mainFirstRow"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:padding="5dip" &gt;
  
          &lt;LinearLayout
              android:id="@+id/mainOnline"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" &gt;
              &lt;ImageView
                  android:id="@+id/mainIconOnline"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:contentDescription="@string/main_page_icon_descp" /&gt;
  
              &lt;TextView
                  android:id="@+id/mainTextOnline"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:textSize="12sp" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/TableRow&gt;
  .
  .
  .
  .
      &lt;/TableLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>