title: Custom spinner where data comes from SQLite database with multiple lines?
body: <p>I'm looking a bit of help on how to get a spinner show multiple items but, get the data from a SQLitedatabase.</p>
  
  <p>I'm already able to get data from the database and put it into a spinner with one item. I do this by pulling a column from the database into an ArrayList then adding the ArrayList to the Array Adapter like below, this is my current code:</p>
  
  <pre><code>spinner = (Spinner) view.findViewById(R.id.Spinner);
  ArrayAdapter&lt;String&gt; catAdapter = new ArrayAdapter&lt;String&gt;(getActivity(), android.R.layout.simple_spinner_item, ArrayListNames);
  catAdapter.setDropDownViewResource(R.layout.spinner_item);
  spinner.setAdapter(catAdapter);
  </code></pre>
  
  <p>What I need however is for the spinner to show two items for each row. Right now I'm pulling a column called 'Names' from the database. I want to be able to show the column 'Age' along with that. </p>
  
  <p>So the spinner will look like this:</p>
  
  <pre><code>Item 1: John
          33
  
  Item 2: Dave
          24
  </code></pre>
  
  <p>The user can then select either John or Dave from the spinner. I just want to be able to show more than one bit of information in each row. The issue for me, is that it's coming from a database into an ArrayList then into the spinner's adapter.</p>
  
  <p>Does anyone know how I can have that extra row for Age?</p>
  
  <p>I would really appreciate some help, thanks!</p>
  
  <p>EDIT: How I'm getting the data right now.</p>
  
  <pre><code>ArrayList&lt;String&gt; ArrayListNames = new ArrayList&lt;String&gt;();
  
      Cursor c = db.rawQuery("SELECT * FROM table_one", null);
      if (c.moveToFirst()) {
          do {
              ArrayListNames.add(c.getString(c.getColumnIndex("name")));
              ArrayListNames.add(c.getString(c.getColumnIndex("age")));
          }
          while (c.moveToNext());
      }
      c.close();
  </code></pre>