我读了这个问题,它说不要担心,但我想我需要一些保证.
我的自定义CursorAdapter的bindView:
@Override
public void bindView(View view, Context context, Cursor c) {
// get handles for views in xml
ImageView imageView = (ImageView)view.findViewById(R.id.add_lvrow_image);
TextView titleView = (TextView)view.findViewById(R.id.add_lvrow_title);
// get data from cursor and "massage" if necessary
String imageUri = c.getString(c.getColumnIndex(CollectionsTable.COL_IMAGEURI));
String title = c.getString(c.getColumnIndex(CollectionsTable.COL_TITLE));
// terrible time getting run-time sizes of imageView, hardcode for now
int XML_WIDTH = 100;
int XML_HEIGHT = 100;
Log.d(TAG, SCOPE + "bindView called: " +count);
count++;
// use static util class
ImageUtils.loadBitmap(context, imageUri, …Run Code Online (Sandbox Code Playgroud)