title: how to create a Listview for dynamic content after parsing xml in android
body: <p>I have parsed an xml from the web using SAX parser. Now I have a problem displaying the parsed data.
  I want to show an ImageButton and a textview side by side. For that I have used the relative layout using code as I have to use list of Imagebuttons and textview (not using xml).</p>
  
  <pre><code>      // Create a new TextView to display the parsing result later.
          RelativeLayout layout = new RelativeLayout(this);
  
  
          /* Create a new TextView to display the parsingresult later. */
          TextView tv = new TextView(this);
          tv.setId(1);
  
          // Defining the layout parameters of the TextView
           RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
                   RelativeLayout.LayoutParams.WRAP_CONTENT,
                   RelativeLayout.LayoutParams.WRAP_CONTENT);
           lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, tv.getId());
           // Setting the parameters on the TextView
           tv.setLayoutParams(lp);
  
           ImageButton imgBtn = new ImageButton(this);
           imgBtn.setId(2);
           RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(
                   RelativeLayout.LayoutParams.WRAP_CONTENT,
                   RelativeLayout.LayoutParams.WRAP_CONTENT);
           lp1.addRule(RelativeLayout.ALIGN_PARENT_LEFT, imgBtn.getId());
           imgBtn.setLayoutParams(lp1); 
            layout.addView(tv);
          layout.addView(imgBtn);
  </code></pre>
  
  <p>I have to show Something like this ::<br>
    ImageButton  textview<br>
    ImageButton  textview .. n  (n depends on the no. of entries in the xml after parsing)</p>
  
  <p>After searching in the web for a day Im confused how to do this. Some used<br>
      listview.setAdapter(new ListAdapter(Splash.this, R.id.list_view, mListItem)); -- where mListItem is an ArrayList of string  but i have a relativelayout which has imagebutton and textview so cann't use this</p>
  
  <p>Should I go for table view or list view and also provide some sample code. Pls suggest.<br>
     Thanks in advance.
     Pavan</p>