Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Listview 自定义列表视图上的毕加索显示内存不足_Listview_Picasso - Fatal编程技术网

Listview 自定义列表视图上的毕加索显示内存不足

Listview 自定义列表视图上的毕加索显示内存不足,listview,picasso,Listview,Picasso,我正在使用毕加索从assets floder加载图片,其中大约有900张图片。但是当我滑动ListView时,logcat会出现在内存中 我的自定义listrow places_layout.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="mat

我正在使用毕加索从assets floder加载图片,其中大约有900张图片。但是当我滑动ListView时,logcat会出现在内存中

我的自定义listrow places_layout.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
    android:id="@+id/iv_test"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"/>
  </RelativeLayout>
 public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder=null;
    if(convertView==null){
        holder=new ViewHolder();
        convertView= LayoutInflater.from(mContext).inflate(R.layout.list_item,null);
        holder.mImageView=(ImageView)convertView.findViewById(R.id.iv_test);
        convertView.setTag(holder);
    }else {
        holder=(ViewHolder)convertView.getTag();
    }
    Picasso.with(mContext).load("file:///android_asset/picture/" + mPictureNames.get(position)).resize(200,200).into(holder.mImageView);


  //  holder.mImageView.setImageBitmap(getPicture(position));

    return convertView;
}