How to get tablerow id dynamically in android?
<p>Hello, my old code is working, but the problem is that when i am clicking tablerow it call another activty, but it not set that table row data but it setting last array data to that activity.</p>

<p>Means it  set the last array value to next screen activity.</p>

<pre><code>for ( j = 0; j &lt; dataListfeture.size(); j++)
            {

                HashMap&lt;String, String&gt; hm = new HashMap&lt;String, String&gt;();

                hm = dataListfeture.get(j);

                final TableRow tblrow = new TableRow(MainScreen.this);
                final View rowView = inflater.inflate(R.layout.featuredrow, null);
                tblrow.setId(j);
                tblrow.getId();



                featuredName = (TextView) rowView.findViewById(R.id.xxName);
                featuredDistance = (TextView) rowView.findViewById(R.id.xxDistance);
                featuredVeneType = (TextView) rowView.findViewById(R.id.xxVeneType);
                featuredPhone = (TextView) rowView.findViewById(R.id.xxPhone);
                featuredAddress = (TextView) rowView.findViewById(R.id.xxAddress);

                Drawable image = ImageOperations(MainScreen.this, hm.get("url"), "image.jpg");

                featuredImage = (ImageView) rowView.findViewById(R.id.xxdImage);
                featuredImage.setImageDrawable(image);

                featuredName.setText("" + hm.get("name"));
                featuredDistance.setText("" + hm.get("distance") + " mi");
                featuredVeneType.setText("" + hm.get("venuetype"));
                featuredPhone.setText("" + hm.get("phonenumber"));
                featuredAddress.setText("" + hm.get("address"));


                mapnamelist = hm.get("name");
                mapvenuelist = hm.get("venuetype");
                mapothervenuelist  = hm.get("othervenuetype");
                mapaddresslist= hm.get("address");
                mapcitylist= hm.get("city");
                mapstatelist= hm.get("state");


                tblrow.setOnClickListener(new OnClickListener() 
                {

                    @Override
                    public void onClick(View v) 
                    {

                        final ProgressDialog progDailog = ProgressDialog.show(MainScreen.this, null, "Loading ....", true);
                        final Handler handler = new Handler()
                        {
                            public void handleMessage(Message msg)
                            {
                                System.out.println("search");

                                Intent myIntent = new Intent(MainScreen.this, xxxxscreen.class);
                                startActivity(myIntent);
                                MainScreen.this.finish();
                                progDailog.dismiss();

                            }
                        };

                        new Thread()
                        {
                            public void run()
                            {
                                try
                                {

                                    System.out.println();


                                    handler.sendEmptyMessage(1);

                                }
                                catch (Exception e)
                                {
                                    e.printStackTrace();
                                }
                            }
                        }.start();

                    }
                });
</code></pre>
