title: Android: Use spinner text in CursorAdapter
body: <p>I've got an ListView that is filled with an SimpleCursorAdapter. One of the Fields that should be displayed in this view (TBTsqlHelperBudgets.KEY_INTERVAL) is stored in the DB as int (index of the spinner, that is used for input). But I would like to show the text rather than the index in the ListView. Any Suggestions?</p>
  
  <pre><code>public class TBTTManageBudgetsActivity extends Activity {
      // ...
      // some stuff 
      // ...
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          // ...
          // some stuff 
          // ...
                  cursor = getBudgets();
                  String[] uiBindFrom = { TBTsqlHelperBudgets.KEY_NAME, TBTsqlHelperBudgets.KEY_BUDGET, TBTsqlHelperBudgets.KEY_INTERVAL };               
                  int[] uiBindTo = { R.id.name, R.id.budget, R.id.interval};
                  cursor.moveToFirst();
                  CursorAdapter adapter = new SimpleCursorAdapter(this.getApplicationContext(), R.layout.list_budgets_item, cursor, uiBindFrom, uiBindTo);                
                  listView.setAdapter(adapter);
          // ...
          // some stuff 
          // ...
      }
      // ...
      // some stuff 
      // ...
  }
  </code></pre>
  
  <p>By the way: The spinner is set up using an xml array:</p>
  
  <pre><code>ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(this, R.array.intervals, android.R.layout.simple_spinner_item);
  </code></pre>
  
  <p>with the xml:</p>
  
  <pre><code>&lt;resources&gt;
      &lt;string-array name="intervals"&gt;
          &lt;item&gt;per day&lt;/item&gt;
          &lt;item&gt;per week&lt;/item&gt;
          &lt;item&gt;per month&lt;/item&gt;
          &lt;item&gt;per year&lt;/item&gt;
      &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>