title: Selecting from spinner and clicking a button to open a new activity
body: <p>How can i start a new activity with a button when i select from a spinner? 
  my code tho.. i've searched a lot but nothing works, hope something happens here :)</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
  
      ImageButton button = (ImageButton) findViewById(R.id.imgbtnarroceros);
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(MainActivity.this, Main2Activity.class);
              startActivity(intent);
          }
      });
  
      Spinner spinner;
      spinner= (Spinner) findViewById(R.id.spinner) ;
      ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.itinerary, android.R.layout.simple_spinner_item) ;
      spinner.setAdapter(adapter);
  </code></pre>