title: How start new activity with click on table rows and pass data to new activity in EditText
body: <p>Following is my code and I have already set OnClickListener with each table row,it is working. Now I want to start a new activity when user click on any row and also I want to pass the data of row to new activity in a textedit. </p>
  
  <pre><code>            Cursor c=db.rawQuery("SELECT * FROM student WHERE rollno='"+docno.getText()+"'", null);
  
                    int rows = c.getCount();
                    table_layout.removeAllViews();
                    c.moveToFirst();
                    for (int i = 0; i &lt; rows; i++) {
  
                        String rollno  = c.getString(0);
                        String name    = c.getString(1);
                        String marks   = c.getString(2);
                     TableRow row = new TableRow(this);
                     row.setClickable(true); 
                      row.setOnClickListener(new OnClickListener() {
                          public void onClick(View v) {
                              v.setBackgroundColor(Color.GRAY);
                          }
                      });
  
                     row.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
                     LayoutParams.WRAP_CONTENT));
  
                      TextView et = new TextView(this);
                      TextView name1 = new TextView(this);
                      TextView marks1 = new TextView(this);
  
                      name1.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
                      LayoutParams.WRAP_CONTENT));
  
                      et.setGravity(Gravity.CENTER);
                      et.setTextSize(10);
                      et.setText(rollno);
  
                      name1.setGravity(Gravity.CENTER);
                      name1.setTextSize(10);
                      name1.setText(name);
                      name1.setBackgroundColor(0xFF00FF00);
                      name1.setHeight(20);
                      name1.setWidth(180);
  
                      marks1.setGravity(Gravity.CENTER);
                      marks1.setTextSize(10);
                      marks1.setText(marks);
  
                      row.addView(et);
                      row.addView(name1);
                      row.addView(marks1);
  
                     table_layout.addView(row);
                     c.moveToNext();
  
                    }
  </code></pre>