Android ListView: how to avoid database query in bindView()? Need to fetch one to many relationship data
问题 I have a list view to display albums. In each album list item, I need to display some information from each photo in this album. Here is how my cursor loader looks like: @Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { return new CursorLoader(this, AlbumsColumns.CONTENT_URI, null, null, null, null); } @Override public void bindView(View view, Context context, Cursor cursor) { long albumId = cursor.getLong(cursor.getColumnIndex(AlbumsColumns._ID)); Cursor photoCursor =