标签:null instance logs 适配器 这一 group code turn splay
这是适配器里面的方法,只需这一点要改就行
public View getView(int position, View convertView, ViewGroup parent) { if (position%2==0){ convertView=View.inflate(context,R.layout.item,null); TextView tv= (TextView) convertView.findViewById(R.id.tv); ImageView image= (ImageView) convertView.findViewById(R.id.image); tv.setText(list.get(position).getSteps().get(0).getStep()); ImageLoader.getInstance().displayImage(list.get(position).getSteps().get(0).getImg(),image,appliction.getDiskImageoptoins()); }else{ convertView=View.inflate(context,R.layout.item2,null); TextView tvv= (TextView) convertView.findViewById(R.id.tvv); ImageView imagee= (ImageView) convertView.findViewById(R.id.imagee); tvv.setText(list.get(position).getSteps().get(0).getStep()); ImageLoader.getInstance().displayImage(list.get(position).getSteps().get(0).getImg(),imagee,appliction.getDiskImageoptoins()); } return convertView; }
标签:null instance logs 适配器 这一 group code turn splay
原文地址:http://www.cnblogs.com/leshen/p/7387800.html