title: Images in SimpleCursorAdapter
body: <p>I'm trying to use a <code>SimpleCursorAdapter</code> with a <code>ViewBinder</code> to get an image from the database and put it into my <code>ListView</code> item view. Here is my code:</p>
  <pre><code>private void setUpViews() {
      mNewsView = (ListView) findViewById(R.id.news_list);
  
      Cursor cursor = getNews();
      SimpleCursorAdapter curAdapter = new SimpleCursorAdapter(
              getApplicationContext(), R.layout.cursor_item, cursor,
              new String[] { &quot;title&quot;, &quot;content&quot;, &quot;image&quot; },
              new int[] { R.id.cursor_title, R.id.cursor_content,
                      R.id.news_image });
      
      ViewBinder viewBinder = new ViewBinder() {
          
          public boolean setViewValue(View view, Cursor cursor,
                  int columnIndex) {
              ImageView image = (ImageView) view;
              byte[] byteArr = cursor.getBlob(columnIndex);
              image.setImageBitmap(BitmapFactory.decodeByteArray(byteArr, 0, byteArr.length));
              return true;
          }
      };
      ImageView image = (ImageView) findViewById(R.id.news_image);
      viewBinder.setViewValue(image, cursor, cursor.getColumnIndex(&quot;image&quot;));
      curAdapter.setViewBinder(viewBinder);
      mNewsView.setAdapter(curAdapter);
  }
  </code></pre>
  <p>I am getting:</p>
  <pre><code>android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 60
  </code></pre>
  <p>while executing <code>byte[] byteArr = cursor.getBlob(columnIndex);</code>. Does anyone have an idea what am I doing wrong?</p>