相关疑难解决方法(0)

自定义CursorAdapater的bindView调用了77次......我做错了什么?

我读了这个问题,它说不要担心,但我想我需要一些保证.

我的自定义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)

android android-cursoradapter

3
推荐指数
1
解决办法
1796
查看次数

标签 统计

android ×1

android-cursoradapter ×1