title: How can I get my spinner to fill with database data?
body: <p>I'm having a lot of problems trying to get my spinner to fill with data after my application loads.  I'm just messing around and made a database for vehicles. So I'm trying to get a spinner to load the database data into it.  This is the code I use in a method to attempt to do so, but my spinner is never loaded with my database data.</p>
  
  <pre><code>SQLiteDatabase db = database.getReadableDatabase();
  Cursor cursor = db.rawQuery("SELECT vehicle_make, vehicle_model, vehicle_year FROM vehicles;", null);
  vehicleProfileSpinner = (Spinner) findViewById(R.id.vehicleProfileSpinner); 
  startManagingCursor(cursor);
  
  String[] columns = {"vehicle_year", "vehicle_make", "vehicle_model"};
  int[] theView = {R.id.vehicleProfileSpinner};
  SimpleCursorAdapter vpsAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_dropdown_item, cursor, columns, theView);
  vpsAdapter.setDropDownViewResource(R.layout.main);
  vehicleProfileSpinner.setAdapter(vpsAdapter);
  </code></pre>