title: Android - Change View when alertdialog button is clicked
body: <p>I have a listview with a couple of strings in at the moment. when a user selects one it brings up an alertdialog box which gives the option to book(this is going to be a taxi app) or cancel. What i cant work out is how to get it so that when the user clicks "Book" it takes the information they've selected and loads up a new view with more contact information.</p>
  
  <p>My Code is currently this -</p>
  
  <p>public class ListTaxi extends ListActivity{
      /** Called when the activity is first created. */
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);</p>
  
  <pre><code>    String[] taxi = getResources().getStringArray(R.array.taxi_array);
      setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.listtaxi, taxi));
  
      final ListView lv = getListView();
      lv.setTextFilterEnabled(true);
  
          lv.setOnItemClickListener(new OnItemClickListener() {
          public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id)
         {   
             AlertDialog.Builder adb=new AlertDialog.Builder(ListTaxi.this); 
             adb.setTitle("Taxi Booking");
             adb.setMessage("You have chosen = "+lv.getItemAtPosition(position)); 
            adb.setPositiveButton("Book", null);
            adb.setNegativeButton("Cancel", null); 
            adb.show(); 
         } 
   }); 
  </code></pre>
  
  <p>Any help or pointers with this would be immensely appreciated as its the last bit i need to get working before its almost done.</p>
  
  <p>Thanks everyone</p>
  
  <p>Oli</p>