title: Starting a new Activity with Spinner
body: <p>I was wondering if anybody knows how to start a new activity, when you change the value of a spinner without having to press an button. <br/>
  I have been searching the web for hours, but I cannot find anything that leads me in the right direction. So i am hoping somebody here can help me.</p>
  
  <p>This is just my code of a standard spinner:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
  
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.share);
  
      Button view = (Button) findViewById(R.id.button1);
      view.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {
              // TODO Auto-generated method stub
              startActivity(new Intent("net.thinkbin.TUTORIAL1"));
              overridePendingTransition(0, 0);
              finish();
          }
      });
  
      Button menu = (Button) findViewById(R.id.buttonhome);
      menu.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
              // custom dialog
              final Dialog dialog = new Dialog(context);
              dialog.setContentView(R.layout.custom);
  
              // set the custom dialog components - text, image and button
              TextView text = (TextView) dialog.findViewById(R.id.text);
              text.setText("Loading...");
              ImageView image = (ImageView) dialog.findViewById(R.id.image);
              image.setImageResource(R.drawable.hourglass);
  
              dialog.show();
              Thread th = new Thread(new Runnable() {
                  public void run() {
  
                      startActivity(new Intent("net.thinkbin.MENU"));
                      overridePendingTransition(0, 0);
                      dialog.dismiss();
                      finish();
  
                  }
              });
              th.start();
          }
      });
  
      ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter
              .createFromResource(this, R.array.spinnerfood,
                      android.R.layout.simple_spinner_item);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
      Spinner s = (Spinner) findViewById(R.id.spinner1);
      s.setAdapter(adapter);
  </code></pre>