title: Use Spinner to open another class
body: <p>Trying to use this code to open a class from a dropdown list on a spinner. So if help is pressed the help activity opens and if navigation is pressed the navigation class opens</p>
  <pre><code>//declare spinner.
          Spinner dropdown = findViewById(R.id.spinner1);
          String[] items = new String[]{&quot;Help&quot;, &quot;Navigation Help&quot;};
          ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;&gt;(this, android.R.layout.simple_spinner_dropdown_item, items);
  
          dropdown.setAdapter(adapter);
          
      }
  
      public void onItemSelected(AdapterView&lt;?&gt; parent, View view,
                                 int pos, long id) {
         
          
      }
  
      public void onNothingSelected(AdapterView&lt;?&gt; parent) {
      
      }
  }
  </code></pre>