dyanamic adding column in tableview
<p>I'm trying to display 2 image in one row.</p>

<pre><code> for(int i=0;i&lt;sitesList.getPdf().size();i++)
    {
          count=sitesList.getPdf().size();
          Log.v(".....count.....",count+"");
          Bitmap bmp;
          URL url=null;
          String s; 
        name[i] = new TextView(this);
        name[i].setText("Name = "+sitesList.getCatName().get(i));
        id[i] = new TextView(this);
        id[i].setText("id = "+sitesList.getCatId().get(i));
        thumbnail[i] = new TextView(this);
        thumbnail[i].setText("thumbnail = "+sitesList.getThumbnail().get(i));
        pdf[i] = new TextView(this);
        pdf[i].setText("pdf = "+sitesList.getPdf().get(i));

        try
        {
            s=sitesList.getThumbnail().get(i);
            Log.v("...newSSS...",s+"");
            url = new URL(s);


        }
            catch(MalformedURLException e)
        {
            e.printStackTrace();
        }
        TableRow tr = new TableRow(this);
        Log.v("....table row....",tr+"");
        tr.setLayoutParams(new LayoutParams(
                LayoutParams.FILL_PARENT,
                LayoutParams.WRAP_CONTENT));
        ImageView iv= new ImageView(this);
        try
        {
              HttpURLConnection conn=(HttpURLConnection)url.openConnection(); 
              conn.setDoInput(true);
              conn.connect();
             InputStream is = conn.getInputStream();
            bmp = BitmapFactory.decodeStream(is); 
              iv.setImageBitmap(bmp);
        }
             catch(Exception e)
        {
            e.printStackTrace();
        }

        iv.setLayoutParams(new LayoutParams(
                LayoutParams.FILL_PARENT,
                LayoutParams.WRAP_CONTENT));
        int ids=iv.getId();
        Log.v(".....ID.....",ids+"");
        if(i%2==0)
        {
        tr.addView(iv);
        }
        else
        {
            //tr.addView(iv);

        }

        tl.addView(tr,new TableLayout.LayoutParams(
                LayoutParams.FILL_PARENT,
                LayoutParams.WRAP_CONTENT));

        //layout.addView(name[i]);
        //layout.addView(id[i]);
        //layout.addView(thumbnail[i]);
        //layout.addView(pdf[i]);
    }
</code></pre>
