title: Getting values from each row in table layout in android
body: <p>I have created a <code>TableLayout</code> where I stored values in hardcode.Now I want to see the data of a row which i have clicked in another page.I have tried in many ways but actually I am getting confused to implement the proper way.<br>
  Please suggest the proper way to fetch the vales of the rows and show them in a different page.</p>
  
  <p>This is my xml table layout..</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent" 
  android:background="@drawable/lightbackground"
  android:id="@+id/tablepickup"
  android:clickable="true"
   android:shrinkColumns="*"
  android:stretchColumns="*"&gt;
  
  &lt;ImageView
      android:id="@+id/imageView1"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:scaleType="fitXY"
      android:src="@drawable/d" /&gt;
  
   &lt;TableRow
      android:id="@+id/tableRow1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:gravity="center_horizontal" &gt;
  &lt;/TableRow&gt;
  
  &lt;TableRow
      android:id="@+id/tableRow2"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
      &lt;TextView
          android:id="@+id/TextView1"
          android:gravity="center"
          android:text="Items"
          android:textSize="20dp"
          android:textStyle="bold"
          android:typeface="normal" &gt;
  
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/TextView2"
          android:gravity="center"
          android:text="Address"
          android:textSize="18dp"
          android:textStyle="bold"
          android:typeface="normal" &gt;
  
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/TextView3"
          android:gravity="center"
          android:text="PickBy"
          android:textSize="18dp"
          android:textStyle="bold"
          android:typeface="normal" &gt;
  
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/TextView4"
          android:gravity="center"
          android:text="Status"
          android:textSize="18dp"
          android:textStyle="bold"
          android:typeface="normal" &gt;
  
      &lt;/TextView&gt;
  &lt;/TableRow&gt;
  
  &lt;TableRow
      android:id="@+id/tableRow3"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
  
  
      &lt;TextView
          android:id="@+id/textView6"
          android:gravity="center_horizontal"
          android:text="Dairy Milk" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView7"
          android:gravity="center_horizontal"
          android:text="18,D.H.Rd" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView8"
          android:gravity="center_horizontal"
          android:text="Sushil" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView9"
          android:gravity="center_horizontal"
          android:text="Picked" &gt;
      &lt;/TextView&gt;
  &lt;/TableRow&gt;
  
  &lt;TableRow
      android:id="@+id/tableRow4"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
  
  
      &lt;TextView
          android:id="@+id/textView11"
          android:gravity="center_horizontal"
          android:text="Bournville" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView12"
          android:gravity="center_horizontal"
          android:text="EC5,Sec1" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView13"
          android:gravity="center_horizontal"
          android:text="Hemant" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView14"
          android:gravity="center_horizontal"
          android:text="Picked" &gt;
      &lt;/TextView&gt;
  &lt;/TableRow&gt;
  &lt;TableRow
      android:id="@+id/tableRow5"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
  
  
      &lt;TextView
          android:id="@+id/textView15"
          android:gravity="center_horizontal"
          android:text="Gems" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView16"
          android:gravity="center_horizontal"
          android:text="AP5,Sec5" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView17"
          android:gravity="center_horizontal"
          android:text="Suresh" &gt;
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id="@+id/textView18"
          android:gravity="center_horizontal"
          android:text="Pending" &gt;
      &lt;/TextView&gt;
  &lt;/TableRow&gt;
  </code></pre>
  
  <p><strong>and this is my .java page...</strong></p>
  
  <pre><code>package com.android.pickupdelivery;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.TableLayout;
  import android.widget.TableRow;
  
  public class Pickuplist extends Activity{
  
  //private static final int i = 0;
  TableLayout mtablelayout;
  TableRow mtablerow5;
  private OnClickListener mListener;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.pickuplist);
  
      mtablerow5=(TableRow)findViewById(R.id.tableRow5);
      mtablelayout =(TableLayout)findViewById(R.id.tablepickup);
     mtablerow5.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              startActivity(new Intent(Pickuplist.this,Showdetails.class));
          }
      });
  </code></pre>
  
  <p>I have left my .java page incomplete so that you may freely give your valuable suggestion...please help me...this is my first application invoving <code>TableLayout</code></p>