您好我正在ListView
工作,只有图片看得正确但不能滚动,请检查我的代码并给我适当的答案。
public View getView(int position, View convertView, ViewGroup parent) {
View vi = convertView;
ViewImageItem imghoder ;
if (convertView == null){
imghoder =new ViewImageItem();
vi = inflater.inflate(R.layout.list_row, null);
imghoder.imgItem = (ImageView) vi.findViewById(R.id.list_image);
vi.setTag(imghoder);
} else {
imghoder = (ViewImageItem) vi.getTag();
}
//imghoder.imgItem.setImageResource(mThumbIds[position]);
imghoder.imgItem.setImageResource(mThumbIds[position]);
return vi;
}
private static class ViewImageItem {
ImageView imgItem;
}