我正在从Parse检索图像并且在设置图像适配器时遇到问题。问题出在ImageAdapter
类的最后一行
问题出现在倒数第二行,设置后的图像字为红色。
public ImeAdapter(Context context, List<Ime> objects) {
super(context, R.layout.ime_row_item, objects);
this.mContext = context;
this.mImes = objects;
}
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater mLayoutInflater = LayoutInflater.from(mContext);
convertView = mLayoutInflater.inflate(R.layout.ime_row_item, null);
}
Ime ime = mImes.get(position);
ImageView imgView = (ImageView) convertView.findViewById(R.id.ime_img);
imgView.setImage(ime.getImg());
return convertView;
}
我该如何解决?