title: Change the adapter of a spinner on runtime using onItemSelectedListener
body: <p>This is my code</p>
  
  <pre><code>[...]
  final String[] top_spinner_items = new String[35];
  for (int i = 0; i &lt; top_spinner_items.length; i++) {
      top_spinner_items[i] = Integer.toString(i+1);
  }
  ArrayAdapter&lt;String&gt; spn_topItemsAdapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_spinner_item, top_spinner_items);
  spn_topItemsAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  [...]
  
  
  
  AdapterView.OnItemSelectedListener lst_bottomSpinner_changed_element = new OnItemSelectedListener() {
  
      public void onItemSelected(AdapterView&lt;?&gt; parentView, View selectedItemView, int position, long id) {
          //
          final String[] top_spinner_items = new String[35];
          for (int i = 0; i &lt; top_spinner_items.length; i++) {
              top_spinner_items[i] = Integer.toString(i+1);
          }
          ArrayAdapter&lt;String&gt; spn_topItemsAdapter = new ArrayAdapter&lt;String&gt;(this,
                  android.R.layout.simple_spinner_item, top_spinner_items);
          spn_topItemsAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      }
  
      public void onNothingSelected(AdapterView&lt;?&gt; parentView) {
          // your code here
      }
  
  };
  </code></pre>
  
  <p>(all the missing references are in the code are between or before the code)</p>
  
  <p>My question is why inside AdapterView.OnItemSelectedListener</p>
  
  <pre><code>ArrayAdapter&lt;String&gt; spn_topItemsAdapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_spinner_item, top_spinner_items);
  </code></pre>
  
  <p>gives error. It says "the constructor is undefined". I tryed using android.widget.ArrayAdapter, but got none.
  I'm trying to change the adapter of a spinner when a previous spinner is changed(i want the second spinner to have the value setted in the previous one)</p>
  
  <p>Do you have any idea?</p>