title: Updating spinner after selecting another spinner
body: <p>Hey guys i just started android app making a couple days ago, im trying to update one spinner information with another spinner. Before you start hating ive already checked the other answers and tried them all but for some reason none work! its supposed to get an array from an xml string file and fill the spinner with that i dont know if ive made a mistake in my code or something but it just doesnt seem to work. Heres the code part that doesnt work:</p>
  
  <pre><code>public class NextBusesActivity extends Activity {
  
  private Spinner spinnerRoutes;
  private Spinner spinnerStops;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_next_buses);
  
      spinnerStops = (Spinner)findViewById(R.id.nextBusStopsSpinner);
      spinnerRoutes = (Spinner)findViewById(R.id.nextBusRoutesSpinner);
  
  
      spinnerRoutes.setOnItemSelectedListener(spinnerBusRouteHandler);
  }
  
  
  private OnItemSelectedListener spinnerBusRouteHandler= new OnItemSelectedListener(){
  
      public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int pos,
              long id) {
          Log.d(MainActivity.DEBUGTAG, "Made it into the listener");
  
          //if (parent.getItemAtPosition(pos).toString().contains("Trent")){
  
              Log.d(MainActivity.DEBUGTAG, "Made it to Trent west bank     choice");
              ArrayAdapter&lt;CharSequence&gt; adapter =     ArrayAdapter.createFromResource(getApplicationContext(), 
                      R.array.westbank_stops,     android.R.layout.simple_spinner_item);
                       adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
              spinnerStops.setAdapter(adapter);
  
              Log.d(MainActivity.DEBUGTAG, "Spinner refill worked     westbank");
          //}
  
      }
  
      public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
          // TODO Auto-generated method stub
  
      }
  
  };
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.activity_next_buses, menu);
      return true;
  }
  }
  </code></pre>
  
  <p>Thanks for the help guys.</p>