title: Android - store/set imageResource path in database?
body: <pre><code>Cursor c = dbHelper.getMostRecent();
  String[] from = new String[] { "name", "data", "thumb" };
  int[] to = new int[] { R.id.activityName, R.id.activityData, R.id.activityThumb };
  
  startManagingCursor(c);
  SimpleCursorAdapter activities;
  activities = new SimpleCursorAdapter(this, R.layout.activitywidget, c, from, to);
  setListAdapter(activities);
  </code></pre>
  
  <p>On the second line, I'm grabbing the name, data, and thumb from the database.
  On the third line, I'm setting those values for activityName (TextView), activityData (TextView), and activityThumb (ImageView).</p>
  
  <p>It works fine for "name" and "data", but I have no idea what to put for "thumb".
  I have some images in /res/drawable/, but I'm not sure how to store them in the database (file path as a string? R.drawable.IMAGE_NAME as a string? Do I need to save it as raw data somehow?)</p>
  
  <p>Best case scenario: I'd like to just tell each instance of activityThumb in the list what image path it should be using as its resource.</p>
  
  <p>EDIT: I figured it out by creating an implementation of SimpleCursorAdaptor and overriding bindView.</p>