AssetHolder assetHolder = null;
final int position = i;
if(view == null) {
view = LayoutInflater.from(context).inflate(R.layout.bgxx_item, null);
assetHolder = new AssetHolder();
assetHolder.zcpd_tv1 = (TextView) view.findViewById(R.id.zcpd_tv1);
assetHolder.zcpd_tv2 = (TextView) view.findViewById(R.id.zcpd_tv2);
assetHolder.circleImageView=(ImageView)view.findViewById(R.id.fuckyou);
assetHolder.jiluText=(TextView)view.findViewById(R.id.jilu);
view.setTag(assetHolder);
}else {
assetHolder = (AssetHolder) view.getTag();
}
assetHolder.zcpd_tv1.setText(assets.get(i).getName());
Log.v("assetinfo",assets.get(i).getName()+"p");
String codeTemp="";
// if (assets.get(i).getAssetCode() != null){
// codeTemp=assets.get(i).getAssetCode();
// if (codeTemp.length()>7){
// codeTemp = codeTemp.substring(codeTemp.length() - 7, codeTemp.length());
// }
// }
if (assets.get(i).getRoomName()!=null){
assetHolder.zcpd_tv2.setText(assets.get(i).getRoomName());
}else {
assetHolder.zcpd_tv2.setText("暂无地址");
}
assetHolder.jiluText.setTag(i);
assetHolder.jiluText.setOnClickListener(this);
listview的子view常常需要设置tag,tag是不能设置在(view==null)里面的,否则这个tag的数量永远是满屏的item的数量,因为子 view设置tag似乎要从外面的父view里面获得,外面父view复用了,所以子view就会不断重复