title: How to create buttons in an listview,if i click it has to open an activity?
body: <p>I have an list view with image and link functionaliy also,now what i need is i want to create an button in each item in an list view,if i click the buttons it has to go another activity, in that activity page it has to open an xml file respectively of clicking the button,i will hard code the details of xml file preiously in an list view java file,how to do that one.</p>
  
  <pre><code>public class SouthIndianvegrecipes  extends Activity {
  
   @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main1);
  
          ArrayList&lt;Recipedetails1&gt; image_details = GetSearchResults();
  
          final ListView lv1 = (ListView) findViewById(R.id.listV1_main);
          lv1.setAdapter(new ItemListBaseAdapter1(this, image_details));
  
          lv1.setOnItemClickListener(new OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id) { 
                  Object o = lv1.getItemAtPosition(position);
                  Recipedetails1 obj_itemDetails = (Recipedetails1)o;
                  Toast.makeText(SouthIndianvegrecipes.this, "You have chosen : " + " " + obj_itemDetails.getName1(), Toast.LENGTH_LONG).show();
  
  
              } 
          });
      }
  
      private ArrayList&lt;Recipedetails1&gt; GetSearchResults(){
          ArrayList&lt;Recipedetails1&gt; results = new ArrayList&lt;Recipedetails1&gt;();
  
          Recipedetails1 item_details = new Recipedetails1();
          item_details.setName1("Vegterian");
          item_details.setItemDescription1("Recipes made by raw materials");
          item_details.setUrlWiki("https://www.youtube.com/watch?v=C_r0mFvMSfU");
          item_details.setImageNumber1(1);
          results.add(item_details);
  
          item_details = new Recipedetails1();
          item_details.setName1("Non-Vegterian");
          item_details.setItemDescription1("Flesh of sweet animals");
          item_details.setUrlWiki("https://www.youtube.com/watch?v=C_r0mFvMSfU");
          item_details.setImageNumber1(2);
          results.add(item_details);
  
          item_details = new Recipedetails1();
          item_details.setName1("Pickels");
          item_details.setItemDescription1("Touchable dish  by Homemade");
          item_details.setUrlWiki("https://www.youtube.com/watch?v=C_r0mFvMSfU");
          item_details.setImageNumber1(3);
          results.add(item_details);
  
          item_details = new Recipedetails1();
          item_details.setName1("Soups");
          item_details.setItemDescription1("Startup for our food");
          item_details.setUrlWiki("https://www.youtube.com/watch?v=C_r0mFvMSfU");
          item_details.setImageNumber1(4);
          results.add(item_details);
  
  
  
  
          return results;
      }
  </code></pre>
  
  <p>}</p>