【发布时间】:2012-12-03 10:08:05
【问题描述】:
我需要更新自定义适配器中的第三个图像,我尝试使用 getView 方法但没有成功
RelativeLayout rl = (RelativeLayout) rowView.getParent();
ImageView image = (ImageView) rowView.findViewById(R.id.photo);
myCustomAdapter.getView(2, image, rl);
image.setImageBitmap(bitmap);
myCustomAdapter.notifyDataSetChanged();
感谢任何帮助。
【问题讨论】:
-
notifyDataSetChanged 将重绘孔列表项,并为您的适配器调用 getView。我认为更新必须从您的适配器转发到 getView。
-
那我需要改变什么?
标签: android android-listview android-arrayadapter custom-adapter