public void addBitMapToImage(table_interaction_news t_interaction_news, int j, int i) { LinearLayout item_layout = null; if (view_map.containsKey(t_interaction_news.getNews_id())) { item_layout = (LinearLayout) view_map.get(t_interaction_news.getNews_id()); System.out.println("view_map.containsKey-->" + t_interaction_news.getNews_id()); if (j == 0) { news_layout_01.removeView(item_layout); news_layout_01.addView(item_layout); } else if (j == 1) { news_layout_02.removeView(item_layout); news_layout_02.addView(item_layout); } } else { item_layout = (LinearLayout) inflater.inflate(R.layout.z_fragment_interaction_news_listview_item, null); ImageDownLoadAsyncTask imageTask = new ImageDownLoadAsyncTask(t_interaction_news, image_width); imageTask.setItem_layout(item_layout); imageTask.execute(); item_layout.setTag(String.valueOf(i)); item_layout.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getActivity(), "您点击了第" + v.getTag() + "个Item", Toast.LENGTH_SHORT) .show(); } }); if (j == 0) { news_layout_01.addView(item_layout); } else if (j == 1) { news_layout_02.addView(item_layout); } view_map.put(t_interaction_news.getNews_id(), item_layout); System.out.println("view_map.addKey-->" + t_interaction_news.getNews_id()); } }