Android SimpleCursorAdaptor Image ViewBinder
<p>I am using Gridview with ImageView and TextView. I am using SimpleCursorAdapter to display the data from SQLite database. I am able to display the data in TextView from database but not the Images in ImageView. My Image path is stored in one of the fields in the database. I need code for both options like storing images on SD_CARD and also in res drawable folder and read the Image path from database. Any help is really appreciated. I have searched so much but no luck. Thanks in advance. I am new to android and please use my below code and modify it. e.g ImageName are test1.png, test2.png, test3.png, , , ,test98.png etc. Have 100 image names in the database and associated data in Fiedl_2.</p>

<p>case 3: </p>

<p>mCursor = DemoApplication.getDbAdapter().getData(DemoApplication.Field_1, DemoApplication.Field_2, DemoApplication.Fiedl_3);</p>

<p>startManagingCursor(mCursor);<br>
String[] from = new String[] {"ImageName", "Field_4", "_id"};<br>
int[] to = new int[] { R.id.pic, R.id.text1};
                                        adapter = new SimpleCursorAdapter(this, R.layout.list_row_with_image, mCursor, from, to)</p>

<p>//gv is gridview and setting up two columns</p>

<p>gv.setNumColumns(2);</p>

<p>gv.setAdapter(adapter);</p>

<p>gv.setOnItemClickListener(this);</p>
