I have a listview with 2 textviews inside of it that are filled by a database using the simple cursor adapter. I want to add an image inside each item in the list with the corresponding image from the database. I have searched around about this topic but have yet to find a solution. any help would be greatly appreciated
String[] from = new String[]{InventoryDbAdapter.KEY_TITLE, InventoryDbAdapter.KEY_DESCRIPTION};
// and an array of the fields we want to bind those fields to (in this case just text1)
int[] to = new int[]{R.id.text1,R.id.text2};
// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter inventory =
new SimpleCursorAdapter(this, R.layout.r开发者_JAVA技巧ow, InventoryCursor, from, to);
setListAdapter(inventory
thanks
Really? Because a quick Google search turned up this blog entry which I think is the same one I used for my Android applications.
精彩评论